octopus: allow criss-cross and clarify the message when it rejects
[gitweb.git] / commit.c
index edd4dedcdd13c2c3fd02714ef282b173f7cec7fe..56efc69f1f4bf1568eaa549bed16f7cc2cd669ba 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -1,6 +1,6 @@
+#include "cache.h"
 #include "tag.h"
 #include "commit.h"
-#include "cache.h"
 
 int save_commit_buffer = 1;
 
@@ -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
  */