From: LorenzoPegorari Date: Fri, 10 Apr 2026 15:01:26 GMT Subject: [GSoC PATCH v4 0/5] preserve promisor files content after repack Message-ID: In-Reply-To: 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 some tests to "t7700-repack.sh" and "t7703-repack-geometric.sh" that check if the content of .promisor files are correctly copied into the .promisor files created by a repack. If Eric Sunshine, Tian Yuchen (for the patch 2/5 "pack-write: add helper to fill promisor file after repack") and Junio Hamano (for all patches) want to be added with a `` tag, please let me know (and, of course, thanks a lot for the help)! QUESTION: The "CodingGuidelines" explicitly state that: "A C file must directly include the header files that declare the functions and the types it uses, except for the functions and types that are made available to it by including one of the header files it must include by the previous rule" where "the previous rule" is (if I understand correctly), the one related to "". From what I understand then, I should have added an include for "strmap.h" (which is needed for `strset`), correct? And if I am correct, shouldn't "strbuf.h", "hash.h", "odb.h", "string-list.h" and "strvec.h" also be included? V4 DIFF: * `copy_promisor_content()` now prints timestamps in Unix time format. * `copy_promisor_content()` now doesn't use a list of `strbuf`, but instead uses the more lightweight `string_list`. * improved the tests. * fixed issue (that showed up in the GitHub Actions-based CI) where sometimes the 2 packs created in the second new test inside "t7700" were not both repacked into a single new pack. LorenzoPegorari (5): 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 t7703: test for promisor file content after geometric repack Documentation/git-repack.adoc | 4 +- pack-write.c | 9 +++ repack-promisor.c | 146 +++++++++++++++++++++++++++++++--- t/t7700-repack.sh | 60 ++++++++++++++ t/t7703-repack-geometric.sh | 33 ++++++++ 5 files changed, 237 insertions(+), 15 deletions(-) Range-diff against v3: 1: eb1964dca8 = 1: b4990fcdf0 pack-write: add explanation to promisor file content 2: 3cd1542919 ! 2: 34c4e79311 pack-write: add helper to fill promisor file after repack @@ Commit message stored as lines structured like this: " ". Create a `copy_promisor_content()` helper function that allows this - debugging info to not be lost after a `repack`, by coping it inside a new - ".promisor" file. + debugging info to not be lost after a `repack`, by copying it inside a + new ".promisor" file. The function logic is the following: * Take all ".promisor" files contained inside the given `repo`. @@ Commit message (intended to be used for packfiles that have not been repacked). * Read each line of the remaining ".promisor" files, which can be: * " " if the ".promisor" file was never repacked. If so, - add the time at which the ".promisor" file was last modified