提交 19ece726 编写于 作者: J Junio C Hamano

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
......@@ -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)
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册