From: LorenzoPegorari <lorenzo.pegorari2002@gmail.com>
To: git@vger.kernel.org
Cc: Elijah Newren <newren@gmail.com>, Patrick Steinhardt <ps@pks.im>,
Junio C Hamano <gitster@pobox.com>, Taylor Blau <me@ttaylorr.com>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: [GSoC PATCH v2 0/4] preserve promisor files content after repack
Date: Sun, 22 Mar 2026 20:16:03 +0100 [thread overview]
Message-ID: <cover.1774205661.git.lorenzo.pegorari2002@gmail.com> (raw)
In-Reply-To: <cover.1774125871.git.lorenzo.pegorari2002@gmail.com>
The goal of this patch is to solve the NEEDSWORK comment added by
5374a290 (fetch-pack: write fetched refs to .promisor, 14/10/2019). This
is done by adding a helper function that takes the content of all
.promisor files in the `repository`, and copies it inside the first
.promisor file created by the repack.
Also, I added a comment explaining what is the purpose of the content of
the .promisor files, since this wasn't explained anywhere (I found
information regarding this only in the message of the previously cited
commit).
Finally, I added a test to "t7700-repack.sh" that checks if the content
of .promisor files are correctly copied into the first .promisor file
created by a repack.
V2 DIFF:
* changed how the `copy_all_promisor_files()` function works, so that it
reads `dest` into a `strset` in its entirety before entering the
`repo_for_each_pack()` loop, and then checks the `strset` for
existence using `strset_add()` (as suggested by Eric Sunshine)
* correctly release `strbuf`s
* added test
LorenzoPegorari (4):
pack-write: add explanation to promisor file content
pack-write: add helper to fill promisor file after repack
repack-promisor: preserve content of promisor files after repack
t7700: test for promisor file content after repack
Documentation/git-repack.adoc | 4 +-
pack-write.c | 70 +++++++++++++++++++++++++++++++++++
pack.h | 1 +
repack-promisor.c | 23 ++++++++----
t/t7700-repack.sh | 12 ++++++
5 files changed, 100 insertions(+), 10 deletions(-)
Range-diff against v1:
1: 9bba49563e = 1: fec0c24897 pack-write: add explanation to promisor file content
2: 3c0702f81b < -: ---------- pack-write: add helper to fill promisor file after repack
-: ---------- > 2: 0bb031e744 pack-write: add helper to fill promisor file after repack
3: 6967066fe3 = 3: 3dab969a39 repack-promisor: preserve content of promisor files after repack
-: ---------- > 4: cb642d8225 t7700: test for promisor file content after repack
--
2.43.0
next prev parent reply other threads:[~2026-03-22 19:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 21:28 [GSoC PATCH 0/3] preserve promisor files content after repack LorenzoPegorari
2026-03-21 21:28 ` [GSoC PATCH 1/3] pack-write: add explanation to promisor file content LorenzoPegorari
2026-03-21 21:28 ` [GSoC PATCH 2/3] pack-write: add helper to fill promisor file after repack LorenzoPegorari
2026-03-22 2:04 ` Eric Sunshine
2026-03-22 18:50 ` Lorenzo Pegorari
2026-03-21 21:29 ` [GSoC PATCH 3/3] repack-promisor: preserve content of promisor files " LorenzoPegorari
2026-03-22 19:16 ` LorenzoPegorari [this message]
2026-03-22 19:16 ` [GSoC PATCH v2 1/4] pack-write: add explanation to promisor file content LorenzoPegorari
2026-03-23 21:07 ` Junio C Hamano
2026-03-25 21:33 ` Lorenzo Pegorari
2026-03-22 19:18 ` [GSoC PATCH v2 2/4] pack-write: add helper to fill promisor file after repack LorenzoPegorari
2026-03-23 20:27 ` Eric Sunshine
2026-03-26 16:15 ` Lorenzo Pegorari
2026-03-23 21:30 ` Junio C Hamano
2026-03-26 2:01 ` Lorenzo Pegorari
2026-03-22 19:18 ` [GSoC PATCH v2 3/4] repack-promisor: preserve content of promisor files " LorenzoPegorari
2026-03-23 21:48 ` Junio C Hamano
2026-03-26 2:12 ` Lorenzo Pegorari
2026-03-22 19:18 ` [GSoC PATCH v2 4/4] t7700: test for promisor file content " LorenzoPegorari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1774205661.git.lorenzo.pegorari2002@gmail.com \
--to=lorenzo.pegorari2002@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@ttaylorr.com \
--cc=newren@gmail.com \
--cc=ps@pks.im \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox