Merge branch 'jx/pack-redundant-on-single-pack'

"git pack-redandant" when there is only one packfile used to crash,
which has been corrected.

* jx/pack-redundant-on-single-pack:
  pack-redundant: fix crash when one packfile in repo
This commit is contained in:
Junio C Hamano
2020-12-23 13:59:46 -08:00
2 changed files with 45 additions and 10 deletions

View File

@ -473,6 +473,12 @@ static void cmp_local_packs(void)
{
struct pack_list *subset, *pl = local_packs;
/* only one packfile */
if (!pl->next) {
llist_init(&pl->unique_objects);
return;
}
while ((subset = pl)) {
while ((subset = subset->next))
cmp_two_packs(pl, subset);