Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-12-24 00:59:46 +0300
committerJunio C Hamano <gitster@pobox.com>2020-12-24 00:59:46 +0300
commitc46f849f8a2050776688bee408dabc813a44a5c7 (patch)
tree5fbeb0473145c1176c1ffa135c376650b2673be0 /builtin
parent6d3ef5b467eccd2769f1aa1c555d317d3c8dc707 (diff)
parent0696232390d237b64f970e538177ecfd979020d0 (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.c6
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);