blame: move show_root flag to scoreboard

The show_root flag is used in parts of blame that are being moved to libgit, and should be accessible via the scoreboard structure. Signed-off-by: Jeff Smith <whydoubt@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff Smith committed May 24, 2017 at 00:15 UTC 2cf833743294f27d8f167043c84146455b96bdb7
1 file changed +4 -1
builtin/blame.c
+4 -1
@@ -384,6 +384,7 @@ struct blame_scoreboard {
384
385 /* flags */
386 int reverse;
387 + int show_root;
388 };
389
390 static void sanity_check_refcnt(struct blame_scoreboard *);
@@ -1784,7 +1785,7 @@ static void assign_blame(struct blame_scoreboard *sb, int opt)
1785 mark_parents_uninteresting(commit);
1786 }
1787 /* treat root commit as boundary */
1787 - if (!commit->parents && !show_root)
1788 + if (!commit->parents && !sb->show_root)
1789 commit->object.flags |= UNINTERESTING;
1790
1791 /* Take responsibility for the remaining entries */
@@ -2885,6 +2886,8 @@ parse_done:
2886 if (blame_copy_score)
2887 sb.copy_score = blame_copy_score;
2888
2889 + sb.show_root = show_root;
2890 +
2891 read_mailmap(&mailmap, NULL);
2892
2893 assign_blame(&sb, opt);