X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=inline;f=diff-tree.c;h=09d16ad6619d7e95959adf2003a8d0f8626491ce;hb=2db0bfbc04478d9fb42f58ff50ad4123a2a9ddde;hp=ed323d877cad1e78e08f84c1e9ee1ebb09f05d91;hpb=50b8e355b64c93a71d5008557e15f52c032240ff;p=git.git diff --git a/diff-tree.c b/diff-tree.c index ed323d87..09d16ad6 100644 --- a/diff-tree.c +++ b/diff-tree.c @@ -3,6 +3,7 @@ #include "commit.h" static int show_root_diff = 0; +static int no_commit_id = 0; static int verbose_header = 0; static int ignore_merges = 1; static int read_stdin = 0; @@ -29,7 +30,8 @@ static int call_diff_flush(void) return 0; } if (header) { - printf("%s%c", header, diff_options.line_termination); + if (!no_commit_id) + printf("%s%c", header, diff_options.line_termination); header = NULL; } diff_flush(&diff_options); @@ -231,6 +233,10 @@ int main(int argc, const char **argv) show_root_diff = 1; continue; } + if (!strcmp(arg, "--no-commit-id")) { + no_commit_id = 1; + continue; + } usage(diff_tree_usage); } if (diff_options.output_format == DIFF_FORMAT_PATCH)