aboutsummaryrefslogtreecommitdiff
path: root/builtin-blame.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-18 00:13:03 -0700
committerJunio C Hamano <gitster@pobox.com>2009-03-18 00:13:03 -0700
commitaa9ea77de4fffd133b3da1d36a19fd0bd11ad368 (patch)
tree98a6bfdaa489a1353e7c0fefb7757d75db7658c8 /builtin-blame.c
parentea02eef096d4bfcbb83e76cfab0fcb42dbcad35e (diff)
downloadgit-aa9ea77de4fffd133b3da1d36a19fd0bd11ad368.tar.gz
git-aa9ea77de4fffd133b3da1d36a19fd0bd11ad368.tar.xz
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>
Diffstat (limited to 'builtin-blame.c')
-rw-r--r--builtin-blame.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin-blame.c b/builtin-blame.c
index 4ea343189..0c241a9ec 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 (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))
opt |= (PICKAXE_BLAME_COPY | PICKAXE_BLAME_MOVE |
PICKAXE_BLAME_COPY_HARDER);
@@ -2484,10 +2488,6 @@ parse_done:
sb.ent = ent;
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);
if (!incremental)