summaryrefslogtreecommitdiffstats
path: root/wt-status.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-12-12 19:09:16 -0800
committerJunio C Hamano <gitster@pobox.com>2007-12-12 20:50:33 -0800
commit37d07f8f9841a29cb53a1eda6acd3804c957f0e3 (patch)
tree6f450af5c78b44eefb539fd15fcd09dc30e29336 /wt-status.h
parent1e8df762b38e01685f3aa3613e2d61f73346fcbe (diff)
downloadgit-37d07f8f9841a29cb53a1eda6acd3804c957f0e3.tar.gz
git-37d07f8f9841a29cb53a1eda6acd3804c957f0e3.tar.xz
git-commit: squelch needless message during an empty merge
When recording a merge that conflicted and ends up in no changes after manual resolution, commit callchain looked like this: cmd_commit() -> prepare_log_message() -> run_status() -> wt_status_print() This invocation of run_status() is asked to find out if there is a committable change, but it unconditionally gave instructions such as "use git-add" at the same time. When in merge, we do allow an empty change to be recorded, so after showing this message the code still went ahead and made a commit. This introduces "nowarn" parameter to run_status() to avoid these useless messages. If we are not allowed to create an empty commit, we already call run_status() again in the original codepath, and the message will be shown from that call anyway. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wt-status.h')
-rw-r--r--wt-status.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/wt-status.h b/wt-status.h
index 63d50f287..02afaa60e 100644
--- a/wt-status.h
+++ b/wt-status.h
@@ -17,6 +17,7 @@ struct wt_status {
int verbose;
int amend;
int untracked;
+ int nowarn;
/* These are computed during processing of the individual sections */
int commitable;
int workdir_dirty;