summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/commit.c b/commit.c
index edd4dedcdd..e9a29caa27 100644
--- a/commit.c
+++ b/commit.c
@@ -352,6 +352,19 @@ struct commit *pop_most_recent_commit(struct commit_list **list,
return ret;
}
+void clear_commit_marks(struct commit *commit, unsigned int mark)
+{
+ struct commit_list *parents;
+
+ parents = commit->parents;
+ commit->object.flags &= ~mark;
+ while (parents) {
+ if (parents->item && parents->item->object.parsed)
+ clear_commit_marks(parents->item, mark);
+ parents = parents->next;
+ }
+}
+
/*
* Generic support for pretty-printing the header
*/