Skip to content

Commit 2cf8337

Browse files
whydoubtgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f81d70e commit 2cf8337

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

builtin/blame.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ struct blame_scoreboard {
384384

385385
/* flags */
386386
int reverse;
387+
int show_root;
387388
};
388389

389390
static void sanity_check_refcnt(struct blame_scoreboard *);
@@ -1784,7 +1785,7 @@ static void assign_blame(struct blame_scoreboard *sb, int opt)
17841785
mark_parents_uninteresting(commit);
17851786
}
17861787
/* treat root commit as boundary */
1787-
if (!commit->parents && !show_root)
1788+
if (!commit->parents && !sb->show_root)
17881789
commit->object.flags |= UNINTERESTING;
17891790

17901791
/* Take responsibility for the remaining entries */
@@ -2885,6 +2886,8 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
28852886
if (blame_copy_score)
28862887
sb.copy_score = blame_copy_score;
28872888

2889+
sb.show_root = show_root;
2890+
28882891
read_mailmap(&mailmap, NULL);
28892892

28902893
assign_blame(&sb, opt);

0 commit comments

Comments
 (0)