+ if (!strcmp(arg, "-v")) {
+ verbose_header = 1;
+ header_prefix = "diff-tree ";
+ continue;
+ }
+ if (!strncmp(arg, "--pretty", 8)) {
+ verbose_header = 1;
+ header_prefix = "diff-tree ";
+ commit_format = get_commit_format(arg+8);
+ continue;
+ }
+ if (!strcmp(arg, "--stdin")) {
+ read_stdin = 1;
+ continue;
+ }
+ if (!strcmp(arg, "--root")) {
+ 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)
+ diff_options.recursive = 1;
+
+ diff_tree_setup_paths(get_pathspec(prefix, argv));
+
+ switch (nr_sha1) {
+ case 0:
+ if (!read_stdin)
+ usage(diff_tree_usage);
+ break;
+ case 1:
+ diff_tree_commit(sha1[0], NULL);
+ break;
+ case 2:
+ diff_tree_sha1_top(sha1[0], sha1[1], "");
+ break;