зеркало из https://github.com/microsoft/git.git
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>
This commit is contained in:
Родитель
f81d70e940
Коммит
2cf8337432
|
@ -384,6 +384,7 @@ struct blame_scoreboard {
|
||||||
|
|
||||||
/* flags */
|
/* flags */
|
||||||
int reverse;
|
int reverse;
|
||||||
|
int show_root;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void sanity_check_refcnt(struct blame_scoreboard *);
|
static void sanity_check_refcnt(struct blame_scoreboard *);
|
||||||
|
@ -1784,7 +1785,7 @@ static void assign_blame(struct blame_scoreboard *sb, int opt)
|
||||||
mark_parents_uninteresting(commit);
|
mark_parents_uninteresting(commit);
|
||||||
}
|
}
|
||||||
/* treat root commit as boundary */
|
/* treat root commit as boundary */
|
||||||
if (!commit->parents && !show_root)
|
if (!commit->parents && !sb->show_root)
|
||||||
commit->object.flags |= UNINTERESTING;
|
commit->object.flags |= UNINTERESTING;
|
||||||
|
|
||||||
/* Take responsibility for the remaining entries */
|
/* Take responsibility for the remaining entries */
|
||||||
|
@ -2885,6 +2886,8 @@ parse_done:
|
||||||
if (blame_copy_score)
|
if (blame_copy_score)
|
||||||
sb.copy_score = blame_copy_score;
|
sb.copy_score = blame_copy_score;
|
||||||
|
|
||||||
|
sb.show_root = show_root;
|
||||||
|
|
||||||
read_mailmap(&mailmap, NULL);
|
read_mailmap(&mailmap, NULL);
|
||||||
|
|
||||||
assign_blame(&sb, opt);
|
assign_blame(&sb, opt);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче