diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-12-24 00:59:46 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-12-24 00:59:46 +0300 |
commit | c46f849f8a2050776688bee408dabc813a44a5c7 (patch) | |
tree | 5fbeb0473145c1176c1ffa135c376650b2673be0 /builtin | |
parent | 6d3ef5b467eccd2769f1aa1c555d317d3c8dc707 (diff) | |
parent | 0696232390d237b64f970e538177ecfd979020d0 (diff) |
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
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/pack-redundant.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c index 3e70f2a4c1..9fcea3e253 100644 --- a/builtin/pack-redundant.c +++ b/builtin/pack-redundant.c @@ -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); |