diff options
author | Daniel Barkalow <barkalow@iabervon.org> | 2005-04-23 18:47:23 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-23 18:47:23 -0700 |
commit | dd97f850c3fc049f4f0d8b1fd252d54bc1ba6994 (patch) | |
tree | c43426bf10b8a115fd038f96c40731fc0eae8341 /commit.h | |
parent | 90ffd0952f61717d93858b154d2505d0ba051b14 (diff) | |
download | git-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.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 */ |