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>
Junio C Hamano committed
Mar 18, 2009 at 00:13 UTC
aa9ea77de4fffd133b3da1d36a19fd0bd11ad368
1 file changed
+4
-4
builtin-blame.c
+4
-4
@@ -2346,6 +2346,10 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
2346
parse_done:
2347
argc = parse_options_end(&ctx);
2348
2349
+ if (revs_file && read_ancestry(revs_file))
2350
+ die("reading graft file %s failed: %s",
2351
+ revs_file, strerror(errno));
2352
+
2353
if (DIFF_OPT_TST(&revs.diffopt, FIND_COPIES_HARDER))
2354
opt |= (PICKAXE_BLAME_COPY | PICKAXE_BLAME_MOVE |
2355
PICKAXE_BLAME_COPY_HARDER);
@@ -2484,10 +2488,6 @@ parse_done:
2488
sb.ent = ent;
2489
sb.path = path;
2490
2487
- if (revs_file && read_ancestry(revs_file))
2488
- die("reading graft file %s failed: %s",
2489
- revs_file, strerror(errno));
2490
-
2491
read_mailmap(&mailmap, ".mailmap", NULL);
2492
2493
if (!incremental)