diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-10-13 19:03:22 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-13 19:03:22 -0700 |
commit | 0941d6054524bc91f45bf3cbb1c641712b0e0e6d (patch) | |
tree | c2ff08811332fe9247ca57f124863d8289ba7844 /commit.c | |
parent | dd57c76e84372bf16c6bdba9a1bd49da3e617339 (diff) | |
parent | 86a0a408b900eecc9d0d4a1eb8ae223181e96679 (diff) | |
download | git-0941d6054524bc91f45bf3cbb1c641712b0e0e6d.tar.gz |
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.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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; |