diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-12-23 13:59:46 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-12-23 13:59:46 -0800 |
| commit | c46f849f8a2050776688bee408dabc813a44a5c7 (patch) | |
| tree | 5fbeb0473145c1176c1ffa135c376650b2673be0 /builtin | |
| parent | Git 2.30-rc1 (diff) | |
| parent | pack-redundant: fix crash when one packfile in repo (diff) | |
| download | git-c46f849f8a2050776688bee408dabc813a44a5c7.tar.gz git-c46f849f8a2050776688bee408dabc813a44a5c7.zip | |
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); |
