Jeff King <peff@xxxxxxxx> writes: > On Wed, Jul 30, 2008 at 05:43:52PM +0200, Sverre Rabbelier wrote: > >> On Wed, Jul 30, 2008 at 17:01, Björn Steinbrink <B.Steinbrink@xxxxxx> wrote: >> > git blame doesn't know --find-copies-harder, it's -C -C for blame. >> >> Shouldn't it have died with "don't know option --find-copies-harder" then? > > Unfortunately, it _does_ know --find-copies-harder, because unknown > options get sent to the revision option parser, which chains to the diff > option parser. So it recognizes --find-copies-harder, but just sets a > flag that doesn't do what we expect. > > I'm not sure if there is a simple fix. Does blame actually need the diff > option parsing? If not, then we might be able to pass a flag to > parse_revision_opt that says "don't do diff options, too". Sigh... We can probably pick up the result revision parser parsed out of revs.diffopt, and then tweak "opt" with it, perhaps like this. builtin-blame.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/builtin-blame.c b/builtin-blame.c index 8b6b09b..4ea3431 100644 --- a/builtin-blame.c +++ b/builtin-blame.c @@ -2346,6 +2346,10 @@ int cmd_blame(int argc, const char **argv, const char *prefix) parse_done: argc = parse_options_end(&ctx); + if (DIFF_OPT_TST(&revs.diffopt, FIND_COPIES_HARDER)) + opt |= (PICKAXE_BLAME_COPY | PICKAXE_BLAME_MOVE | + PICKAXE_BLAME_COPY_HARDER); + if (!blame_move_score) blame_move_score = BLAME_DEFAULT_MOVE_SCORE; if (!blame_copy_score) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html