+#include "cache.h"
#include "tag.h"
#include "commit.h"
-#include "cache.h"
int save_commit_buffer = 1;
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) {
+ struct commit *parent = parents->item;
+ if (parent && parent->object.parsed &&
+ (parent->object.flags & mark))
+ clear_commit_marks(parent, mark);
+ parents = parents->next;
+ }
+}
+
/*
* Generic support for pretty-printing the header
*/
next = next->next;
count++;
}
+
+ if (!count)
+ return;
/* allocate an array to help sort the list */
nodes = xcalloc(count, sizeof(*nodes));
/* link the list to the array */