From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54ACD75809 for ; Fri, 10 Apr 2026 15:01:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775833295; cv=none; b=gTACgv6h6EBHCEeLk+PUmfY1swFUInwpkSHrXc3BUreqx7e4YcxuW/Ttw0JR4hEtrtDv7dtiqOFS8aMKG8vqqD51WZEINSntr2laxW0DNr/1gzwbmr4Cv69FK826+o548+jjWj5aBmN5m1NULJ0eQ9x+7PBU2eQSiPDzuf+haH8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775833295; c=relaxed/simple; bh=cs18/+vgXmLDjFTNiDuEiSACuQMq14y4czQq4pREp6Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=n12aMmcDhiqj+Ql/rJoHHHilFYlw0dBH4EJBIZTAM2wNbIWmH8IAtPC4ZgArJyt9iY9c1U3VpbBY5RQHX6K6GYSX4y+/Dypqba6SfjM78TgQregtFTHXy3gIUaYJ7/TElczpG2kS8w7SIK/6Mq+TogT3NU9JESAsbvTtGe3d63A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=owryM9HK; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="owryM9HK" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-488a8ca4aadso24340595e9.3 for ; Fri, 10 Apr 2026 08:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775833291; x=1776438091; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=PUa+ToJWIxqHn7wB9J6DACwEvtWN5pavzxJBPt7lTM0=; b=owryM9HKOrYhAnikr6G5IsdnIVUN1Ic2AORzhegx/oxaWgPgQmRfKpYa/1bixFjVXR vjH51KURwIn/prl1HD+E0Q3xyscODMe9RxsNXG0Vrk3jQYPFIH9UP5Wff83FOJJmCLhR l9CmZUyPMHTDkhUJcfftnnCG8k9o9maMKXsIkn8ajsXuJa4RksLjroifuI5uGg9oF1oa LkkDk+ZxJKJZb8K1HBbP1waa2QTZdr5WMaWziFFtQALOmI5s7Xq7qoK4ON8hn2Uh4p2U O6Opn3xnkjnh9/8UFj/Jd0hGOUPRJNiz3JtP+gzJOz4jwSme3qGjksPD+GRWaN0j+yjl QG2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775833291; x=1776438091; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PUa+ToJWIxqHn7wB9J6DACwEvtWN5pavzxJBPt7lTM0=; b=fniCFbQ617o0ysxYZqqRB/FznqyTBUyQb/1GAfCtdKrNKi2zwlb816KA3BhkPn0CuU 5ikygBKh/XUKFxXaevTUQOwdS24cgD74wLIf5usrGFBuSRPZr/uXebNqUZrKnFYtPMFs XJdp5QlUWg3mFq44CQda97CiMinedqBqy9GaZlL2Og1BrNI8JPUXuzFpRWKycXZlgTys Copl66NfP6yUNTY47iLwYslkZanH60X8G3Wx6S7i48ZAEvQjXWRM+buSFIe/IDW0ZKcp NeT3LUdopyjXo2cmFh7sBnwmurIyRkMAXdYqcd0u+CHVc4FjrqQNpt3Sh0GHmHRGDje+ 6VCQ== X-Gm-Message-State: AOJu0YxWcgIqPuMOSjGjdVFWcMoQ+TGNHilLhBeO8wohj6ShANURvqVi OrFnqqCgw95TnJmiUO8ygLHe7xqz/pgKzH8Y7zm9peY1BbHakWXan1lpJwc8FfSTQCE= X-Gm-Gg: AeBDiet6wUEAwpcunOOImNObab8ksxuT85tc0klNCVRroEt8tYzpRJ+k6S2meAnXSYr aJt4fKiC53M+HRuKBnLsss5fizpW2DLdmB1x7PbKffHXTX+7J0lt92QnyGmxLCjA8KJAACtT55+ g7NyAARz+WhKke2eeDDwvjnFWKxpn04SPnvjwjoQPnyYlDgey9NZ2jFK+4NKpvOYFb9idxQAaj+ dbTR//dz1An3iAKRu8ma68VnsuZWByYvb2kzYkc5l42j3oZbASLpVBOlfFRru1BYaaOZ3Q+JT3c CnhO4f4lYR8aagjmUSwdoAEDeiADGiOVbylwEZcwDIERf6op+DsbumravMwECMcFCTCfYeUizlz AsMn6NZD8S3Cht5BSqIAkbCtzyBICD0DnyP7YX8HxAkdgrJylJWx9TquVYA99munGSIfxLDM2xM EUquK7KS27F8p4iNlgK31/BlPLxPqqkUBRLagJZP6QdUbelDxvOQeNFd3fB7iz+qzA4L/hLdkJt 2C8DPm0 X-Received: by 2002:a05:600c:4f95:b0:488:be58:bb5b with SMTP id 5b1f17b1804b1-488d686c443mr48687605e9.24.1775833290240; Fri, 10 Apr 2026 08:01:30 -0700 (PDT) Received: from lorenzo-VM (host-79-19-37-238.retail.telecomitalia.it. [79.19.37.238]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488d5344e28sm84339805e9.7.2026.04.10.08.01.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2026 08:01:29 -0700 (PDT) Date: Fri, 10 Apr 2026 17:01:26 +0200 From: LorenzoPegorari To: git@vger.kernel.org Cc: Taylor Blau , Patrick Steinhardt , Derrick Stolee , Junio C Hamano , Elijah Newren , Eric Sunshine , Tian Yuchen Subject: [GSoC PATCH v4 0/5] preserve promisor files content after repack Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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