Merge branch 'js/maint-graft-unhide-true-parents'
* js/maint-graft-unhide-true-parents: git repack: keep commits hidden by a graft Add a test showing that 'git repack' throws away grafted-away parents Conflicts: git-repack.sh
This commit is contained in:
6
commit.c
6
commit.c
@ -262,7 +262,11 @@ int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size)
|
||||
bufptr[47] != '\n')
|
||||
return error("bad parents in commit %s", sha1_to_hex(item->object.sha1));
|
||||
bufptr += 48;
|
||||
if (graft)
|
||||
/*
|
||||
* The clone is shallow if nr_parent < 0, and we must
|
||||
* not traverse its real parents even when we unhide them.
|
||||
*/
|
||||
if (graft && (graft->nr_parent < 0 || grafts_replace_parents))
|
||||
continue;
|
||||
new_parent = lookup_commit(parent);
|
||||
if (new_parent)
|
||||
|
||||
Reference in New Issue
Block a user