Remove git-rename. git-mv does the same
[gitweb.git] / diff-tree.c
index 382011a2a6d1a701aeb1104991d9abbfcb5b73df..09d16ad6619d7e95959adf2003a8d0f8626491ce 100644 (file)
@@ -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);
@@ -149,8 +151,10 @@ static int diff_tree_stdin(char *line)
 }
 
 static const char diff_tree_usage[] =
-"git-diff-tree [--stdin] [-m] [-s] [-v] [--pretty] [-t] "
-"[<common diff options>] <tree-ish> <tree-ish>"
+"git-diff-tree [--stdin] [-m] [-s] [-v] [--pretty] [-t] [-r] [--root] "
+"[<common diff options>] <tree-ish> [<tree-ish>] [<path>...]\n"
+"  -r            diff recursively\n"
+"  --root        include the initial commit as diff against /dev/null\n"
 COMMON_DIFF_OPTIONS_HELP;
 
 int main(int argc, const char **argv)
@@ -229,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)