X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=commit.c;h=94d5b3d2618d335585084170ef6a3a8e67f34c62;hb=efb98b44536300f5daed25da3650033a1ce7fdef;hp=5d57450de36911ccc37db95cc0701d242cb0ef04;hpb=9786f68bfcc082778aee74159540e341bb239514;p=git.git diff --git a/commit.c b/commit.c index 5d57450de..94d5b3d26 100644 --- a/commit.c +++ b/commit.c @@ -193,7 +193,7 @@ static void prepare_commit_graft(void) commit_graft_prepared = 1; } -static struct commit_graft *lookup_commit_graft(const unsigned char *sha1) +struct commit_graft *lookup_commit_graft(const unsigned char *sha1) { int pos; prepare_commit_graft(); @@ -290,17 +290,6 @@ int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size) } item->date = parse_commit_date(bufptr, tail); - if (track_object_refs) { - unsigned i = 0; - struct commit_list *p; - struct object_refs *refs = alloc_object_refs(n_refs); - if (item->tree) - refs->ref[i++] = &item->tree->object; - for (p = item->parents; p; p = p->next) - refs->ref[i++] = &p->item->object; - set_object_refs(&item->object, refs); - } - return 0; } @@ -387,8 +376,7 @@ struct commit *pop_most_recent_commit(struct commit_list **list, while (parents) { struct commit *commit = parents->item; - parse_commit(commit); - if (!(commit->object.flags & mark)) { + if (!parse_commit(commit) && !(commit->object.flags & mark)) { commit->object.flags |= mark; insert_by_date(commit, list); }