summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJeff Smith <whydoubt@gmail.com>2017-05-24 05:15:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-24 06:41:51 (GMT)
commit2cf833743294f27d8f167043c84146455b96bdb7 (patch)
tree7b731a33922cba72aa8b111f1e39e49aec8d84b8 /builtin
parentf81d70e94010bd0a137249fcf16e15bd4e3d722a (diff)
downloadgit-2cf833743294f27d8f167043c84146455b96bdb7.zip
git-2cf833743294f27d8f167043c84146455b96bdb7.tar.gz
git-2cf833743294f27d8f167043c84146455b96bdb7.tar.bz2
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>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/blame.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index 161d15c..fdd41b4 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -384,6 +384,7 @@ struct blame_scoreboard {
/* flags */
int reverse;
+ int show_root;
};
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);
}
/* treat root commit as boundary */
- if (!commit->parents && !show_root)
+ if (!commit->parents && !sb->show_root)
commit->object.flags |= UNINTERESTING;
/* Take responsibility for the remaining entries */
@@ -2885,6 +2886,8 @@ parse_done:
if (blame_copy_score)
sb.copy_score = blame_copy_score;
+ sb.show_root = show_root;
+
read_mailmap(&mailmap, NULL);
assign_blame(&sb, opt);