diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-09-14 20:48:31 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-14 20:48:31 -0700 |
commit | 19ece726e194f86b8d316d35b65daa92c245453b (patch) | |
tree | 0c13f180db74f7bd90c5d2df9d4a7c03a74765ce | |
parent | ddbca33ca7e08d837ab4faa9a7da563f3f7700aa (diff) | |
parent | f9c75d858d85449a8a6f635bef4b5bd003edd764 (diff) | |
download | git-19ece726e194f86b8d316d35b65daa92c245453b.tar.gz git-19ece726e194f86b8d316d35b65daa92c245453b.tar.xz |
Merge branch 'jk/maint-quiet-is-synonym-to-s-in-log' into maint-1.7.11
* jk/maint-quiet-is-synonym-to-s-in-log:
log: fix --quiet synonym for -s
-rw-r--r-- | builtin/log.c | 2 | ||||
-rwxr-xr-x | t/t7007-show.sh | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/builtin/log.c b/builtin/log.c index 54f24e208..a8249d3c0 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -108,9 +108,9 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix, PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN | PARSE_OPT_KEEP_DASHDASH); - argc = setup_revisions(argc, argv, rev, opt); if (quiet) rev->diffopt.output_format |= DIFF_FORMAT_NO_OUTPUT; + argc = setup_revisions(argc, argv, rev, opt); /* Any arguments at this point are not recognized */ if (argc > 1) diff --git a/t/t7007-show.sh b/t/t7007-show.sh index a40cd3630..e41fa00b8 100755 --- a/t/t7007-show.sh +++ b/t/t7007-show.sh @@ -108,4 +108,16 @@ test_expect_success 'showing range' ' test_cmp expect actual.filtered ' +test_expect_success '-s suppresses diff' ' + echo main3 >expect && + git show -s --format=%s main3 >actual && + test_cmp expect actual +' + +test_expect_success '--quiet suppresses diff' ' + echo main3 >expect && + git show --quiet --format=%s main3 >actual && + test_cmp expect actual +' + test_done |