From: Junio C Hamano Date: Tue, 26 Oct 2010 22:04:05 +0000 (-0700) Subject: Merge branch 'maint' X-Git-Tag: v1.7.4-rc0~172 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/d7806967bd984c75d8abd7afea3fd4930ad0c3fb?hp=-c Merge branch 'maint' * maint: Fix copy-pasted comments related to tree diff handling. --- d7806967bd984c75d8abd7afea3fd4930ad0c3fb diff --combined diff.c index 71efa8edd4,340d878f02..ba57bfab17 --- a/diff.c +++ b/diff.c @@@ -3271,17 -3271,12 +3271,17 @@@ int diff_opt_parse(struct diff_options } else if ((argcount = short_opt('S', av, &optarg))) { options->pickaxe = optarg; + options->pickaxe_opts |= DIFF_PICKAXE_KIND_S; + return argcount; + } else if ((argcount = short_opt('G', av, &optarg))) { + options->pickaxe = optarg; + options->pickaxe_opts |= DIFF_PICKAXE_KIND_G; return argcount; } else if (!strcmp(arg, "--pickaxe-all")) - options->pickaxe_opts = DIFF_PICKAXE_ALL; + options->pickaxe_opts |= DIFF_PICKAXE_ALL; else if (!strcmp(arg, "--pickaxe-regex")) - options->pickaxe_opts = DIFF_PICKAXE_REGEX; + options->pickaxe_opts |= DIFF_PICKAXE_REGEX; else if ((argcount = short_opt('O', av, &optarg))) { options->orderfile = optarg; return argcount; @@@ -3532,7 -3527,7 +3532,7 @@@ static void diff_flush_stat(struct diff if ((DIFF_FILE_VALID(p->one) && S_ISDIR(p->one->mode)) || (DIFF_FILE_VALID(p->two) && S_ISDIR(p->two->mode))) - return; /* no tree diffs in patch format */ + return; /* no useful stat for tree diffs */ run_diffstat(p, o, diffstat); } @@@ -3545,7 -3540,7 +3545,7 @@@ static void diff_flush_checkdiff(struc if ((DIFF_FILE_VALID(p->one) && S_ISDIR(p->one->mode)) || (DIFF_FILE_VALID(p->two) && S_ISDIR(p->two->mode))) - return; /* no tree diffs in patch format */ + return; /* nothing to check in tree diffs */ run_checkdiff(p, o); } @@@ -4181,7 -4176,7 +4181,7 @@@ void diffcore_std(struct diff_options * diffcore_merge_broken(); } if (options->pickaxe) - diffcore_pickaxe(options->pickaxe, options->pickaxe_opts); + diffcore_pickaxe(options); if (options->orderfile) diffcore_order(options->orderfile); if (!options->found_follow)