+ arg = *argv;
+ if (!arg)
+ break;
+
+ if (*arg != '-') {
+ if (nr_sha1 < 2 && !get_sha1(arg, sha1[nr_sha1])) {
+ nr_sha1++;
+ continue;
+ }
+ break;
+ }
+
+ diff_opt_cnt = diff_opt_parse(&diff_options, argv, argc);
+ if (diff_opt_cnt < 0)
+ usage(diff_tree_usage);
+ else if (diff_opt_cnt) {
+ argv += diff_opt_cnt - 1;
+ argc -= diff_opt_cnt - 1;
+ continue;
+ }
+
+
+ if (!strcmp(arg, "--")) {
+ argv++;
+ argc--;
+ break;
+ }
+ if (!strcmp(arg, "-r")) {
+ diff_options.recursive = 1;
+ continue;
+ }
+ if (!strcmp(arg, "-t")) {
+ diff_options.recursive = 1;
+ diff_options.tree_in_recursive = 1;
+ continue;
+ }
+ if (!strcmp(arg, "-m")) {
+ ignore_merges = 0;
+ continue;
+ }
+ 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;