From: Lorenzo Pegorari Date: Tue, 07 Apr 2026 22:07:02 GMT Subject: Re: [GSoC PATCH v3 2/5] pack-write: add helper to fill promisor file after repack Message-ID: In-Reply-To: On Mon, Apr 06, 2026 at 02:34:32PM -0700, Junio C Hamano wrote: > LorenzoPegorari writes: > > > A ".promisor" file may contain ref names (and their associated hashes) > > that were fetched at the time the corresponding packfile was downloaded. > > This information is used for debugging reasons. This information is > > 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. > > "coping" -> "copying" Ack. > > The function logic is the following: > > * Take all ".promisor" files contained inside the given `repo`. > > * Ignore those whose name is contained inside the given `strset > > not_repacked_names`, which basically acts as a "promisor ignorelist" > > (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