diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-05-08 20:06:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-08 20:06:36 -0700 |
commit | ca1c9913f8ac0ccaf976d44822076e1bba5bcd94 (patch) | |
tree | aa320cfc93864826fd28f0a84bac76d9f12a2d5e /builtin-fmt-merge-msg.c | |
parent | 31a3c6bb45aa61e45f1663871620eaf742f0abbb (diff) | |
parent | efb779f8873e5aa36be29a4e551186c62c1b580c (diff) | |
download | git-ca1c9913f8ac0ccaf976d44822076e1bba5bcd94.tar.gz |
Merge branch 'sg/merge-options' (early part)
* 'sg/merge-options' (early part):
merge, pull: add '--(no-)log' command line option
fmt-merge-msg: add '--(no-)log' options and 'merge.log' config variable
add 'merge.stat' config variable
merge, pull: introduce '--(no-)stat' option
doc: moved merge.* config variables into separate merge-config.txt
Diffstat (limited to 'builtin-fmt-merge-msg.c')
-rw-r--r-- | builtin-fmt-merge-msg.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/builtin-fmt-merge-msg.c b/builtin-fmt-merge-msg.c index 7077d52477..b72cb59e6a 100644 --- a/builtin-fmt-merge-msg.c +++ b/builtin-fmt-merge-msg.c @@ -6,13 +6,18 @@ #include "tag.h" static const char *fmt_merge_msg_usage = - "git-fmt-merge-msg [--summary] [--no-summary] [--file <file>]"; + "git-fmt-merge-msg [--log] [--no-log] [--file <file>]"; static int merge_summary; static int fmt_merge_msg_config(const char *key, const char *value) { - if (!strcmp("merge.summary", key)) + static int found_merge_log = 0; + if (!strcmp("merge.log", key)) { + found_merge_log = 1; + merge_summary = git_config_bool(key, value); + } + if (!found_merge_log && !strcmp("merge.summary", key)) merge_summary = git_config_bool(key, value); return 0; } @@ -258,9 +263,10 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix) git_config(fmt_merge_msg_config); while (argc > 1) { - if (!strcmp(argv[1], "--summary")) + if (!strcmp(argv[1], "--log") || !strcmp(argv[1], "--summary")) merge_summary = 1; - else if (!strcmp(argv[1], "--no-summary")) + else if (!strcmp(argv[1], "--no-log") + || !strcmp(argv[1], "--no-summary")) merge_summary = 0; else if (!strcmp(argv[1], "-F") || !strcmp(argv[1], "--file")) { if (argc < 3) |