> Jonathan Tan <jonathantanmy@xxxxxxxxxx> writes: > > > As written in the NEEDSWORK comment, repack does not preserve the > > contents of .promisor files, but I thought I'd send this out anyway as > > this change is already useful for users who don't run repack much. > > What do you exactly mean by "much" here? For diagnostic information to be preserved, the user must not have run repack between the fetch and the discovery of a problem. Admittedly, this is probablistic, but if the user never GCs (for example), this would work. > The comment sounds like it > is saying "running this code once and you'd make the commits and > objects that were depending on the existing promisor invalid", in > which case it would be more like "it is already useful for users > until they run their first repack that destroyes their repository", > but certainly that is not what we want to do, so... To be clear, repacks will not destroy their repository, whether before or after this change. Before and after this change, a repack will just collect all promisor objects from all promisor packs (that is, the ones with .promisor) into one single pack, and then generate an empty .promisor file to indicate that the new single pack is a promisor pack. The difference is that before this change, Git does not write anything into the .promisor file (at least for fetches), so nothing is lost. With this change, we now write something for fetches, so something is lost (since we delete all the old packs, including the .promisor files). But the only thing lost is diagnostic information (for humans - to diagnose, the user will need to open the .promisor file in a text editor) - commits/objects are still valid, and the repository is not destroyed.