merge-recursive: don't segfault while handling rename clashes
[gitweb.git] / builtin-blame.c
index 9b9f5442a277082c8ad04295107eb9ddd6c95b19..e462a6ec5037a9b33894990bcaf2b425273ba647 100644 (file)
@@ -2251,6 +2251,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 (cmd_is_annotate)
                output_option |= OUTPUT_ANNOTATE_COMPAT;
 
@@ -2392,10 +2396,6 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
        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)