summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorDaniel Barkalow <barkalow@iabervon.org>2005-04-23 18:47:23 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-23 18:47:23 -0700
commitdd97f850c3fc049f4f0d8b1fd252d54bc1ba6994 (patch)
treec43426bf10b8a115fd038f96c40731fc0eae8341 /commit.h
parent90ffd0952f61717d93858b154d2505d0ba051b14 (diff)
downloadgit-dd97f850c3fc049f4f0d8b1fd252d54bc1ba6994.tar.gz
[PATCH] Add some functions for commit lists
This adds a function for inserting an item in a commit list, a function for sorting a commit list by date, and a function for progressively scanning a commit history from most recent to least recent. Signed-Off-By: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index 4afd27b109..c8684d1cd0 100644
--- a/commit.h
+++ b/commit.h
@@ -22,6 +22,15 @@ struct commit *lookup_commit(unsigned char *sha1);
int parse_commit(struct commit *item);
+void commit_list_insert(struct commit *item, struct commit_list **list_p);
+
void free_commit_list(struct commit_list *list);
+void sort_by_date(struct commit_list **list);
+
+/** Removes the first commit from a list sorted by date, and adds all
+ * of its parents.
+ **/
+struct commit *pop_most_recent_commit(struct commit_list **list);
+
#endif /* COMMIT_H */