sha1_file: make the new sha1 object writing be coda-friendly.
[git/haiku.git] / rev-list.c
blob42fd154fc1a3b9a066a5d7d3ec997355e53f784e
1 #include "cache.h"
2 #include "commit.h"
4 int main(int argc, char **argv)
6 unsigned char sha1[20];
7 struct commit_list *list = NULL;
8 struct commit *commit;
10 if (argc != 2 || get_sha1(argv[1], sha1))
11 usage("rev-list <commit-id>");
13 commit = lookup_commit(sha1);
14 if (!commit || parse_commit(commit) < 0)
15 die("bad commit object");
17 commit_list_insert(commit, &list);
18 do {
19 struct commit *commit = pop_most_recent_commit(&list, 0x1);
20 printf("%s\n", sha1_to_hex(commit->object.sha1));
21 } while (list);
22 return 0;