Code

Merge branch 'jn/gitweb-unspecified-action' into maint-1.7.8
[git.git] / commit.c
index 9f4cc636dd74e99a1311500e15501bdb4875cb9d..73b7e00292ba2de33fa43b5f028fd807a460af34 100644 (file)
--- 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;