From dd97f850c3fc049f4f0d8b1fd252d54bc1ba6994 Mon Sep 17 00:00:00 2001 From: Daniel Barkalow Date: Sat, 23 Apr 2005 18:47:23 -0700 Subject: [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 Signed-off-by: Linus Torvalds --- commit.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'commit.h') diff --git a/commit.h b/commit.h index 4afd27b10..c8684d1cd 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 */ -- cgit v1.2.1