blame: read custom grafts given by -S before calling setup_revisions()
setup_revisions() while getting the command line arguments parses the given commits from the command line, which means their direct parents will not be rewritten by the custom graft file. Call read_ancestry() early to work around this issue. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
ea02eef096
commit
aa9ea77de4
@ -2346,6 +2346,10 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
|
|||||||
parse_done:
|
parse_done:
|
||||||
argc = parse_options_end(&ctx);
|
argc = parse_options_end(&ctx);
|
||||||
|
|
||||||
|
if (revs_file && read_ancestry(revs_file))
|
||||||
|
die("reading graft file %s failed: %s",
|
||||||
|
revs_file, strerror(errno));
|
||||||
|
|
||||||
if (DIFF_OPT_TST(&revs.diffopt, FIND_COPIES_HARDER))
|
if (DIFF_OPT_TST(&revs.diffopt, FIND_COPIES_HARDER))
|
||||||
opt |= (PICKAXE_BLAME_COPY | PICKAXE_BLAME_MOVE |
|
opt |= (PICKAXE_BLAME_COPY | PICKAXE_BLAME_MOVE |
|
||||||
PICKAXE_BLAME_COPY_HARDER);
|
PICKAXE_BLAME_COPY_HARDER);
|
||||||
@ -2484,10 +2488,6 @@ parse_done:
|
|||||||
sb.ent = ent;
|
sb.ent = ent;
|
||||||
sb.path = path;
|
sb.path = path;
|
||||||
|
|
||||||
if (revs_file && read_ancestry(revs_file))
|
|
||||||
die("reading graft file %s failed: %s",
|
|
||||||
revs_file, strerror(errno));
|
|
||||||
|
|
||||||
read_mailmap(&mailmap, ".mailmap", NULL);
|
read_mailmap(&mailmap, ".mailmap", NULL);
|
||||||
|
|
||||||
if (!incremental)
|
if (!incremental)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user