summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-14 02:03:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-10-14 02:03:22 (GMT)
commit0941d6054524bc91f45bf3cbb1c641712b0e0e6d (patch)
treec2ff08811332fe9247ca57f124863d8289ba7844 /commit.c
parentdd57c76e84372bf16c6bdba9a1bd49da3e617339 (diff)
parent86a0a408b900eecc9d0d4a1eb8ae223181e96679 (diff)
downloadgit-0941d6054524bc91f45bf3cbb1c641712b0e0e6d.zip
git-0941d6054524bc91f45bf3cbb1c641712b0e0e6d.tar.gz
git-0941d6054524bc91f45bf3cbb1c641712b0e0e6d.tar.bz2
Merge branch 'rs/pending'
* rs/pending: commit: factor out clear_commit_marks_for_object_array checkout: use leak_pending flag bundle: use leak_pending flag bisect: use leak_pending flag revision: add leak_pending flag checkout: use add_pending_{object,sha1} in orphan check revision: factor out add_pending_sha1 checkout: check for "Previous HEAD" notice in t2020 Conflicts: builtin/checkout.c revision.c
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/commit.c b/commit.c
index 9f4cc63..73b7e00 100644
--- a/commit.c
+++ b/commit.c
@@ -442,6 +442,20 @@ void clear_commit_marks(struct commit *commit, unsigned int mark)
}
}
+void clear_commit_marks_for_object_array(struct object_array *a, unsigned mark)
+{
+ struct object *object;
+ struct commit *commit;
+ unsigned int i;
+
+ for (i = 0; i < a->nr; i++) {
+ object = a->objects[i].item;
+ commit = lookup_commit_reference_gently(object->sha1, 1);
+ if (commit)
+ clear_commit_marks(commit, mark);
+ }
+}
+
struct commit *pop_commit(struct commit_list **stack)
{
struct commit_list *top = *stack;