git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Derrick Stolee <stolee@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org, christian.couder@gmail.com,
	johannes.schindelin@gmx.de, johncai86@gmail.com,
	jonathantanmy@google.com, karthik.188@gmail.com,
	kristofferhaugsbakk@fastmail.com, me@ttaylorr.com,
	newren@gmail.com, peff@peff.net
Subject: Re: [PATCH 2/3] path-walk: fix setup of pending objects
Date: Thu, 21 Aug 2025 10:01:16 +0200	[thread overview]
Message-ID: <aKbSTN-rfGzadPsm@pks.im> (raw)
In-Reply-To: <c6ab0985-2a74-406b-9685-cc65f8748515@gmail.com>

On Wed, Aug 20, 2025 at 03:42:11PM -0400, Derrick Stolee wrote:
> On 8/20/2025 3:02 PM, Junio C Hamano wrote:
> > "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
> > 
> >> The core problem here is that the "maybe_interesting" member of 'struct
> >> type_and_oid_list' is not initialized to '1'. This member was added in
> >> 6333e7ae0b (path-walk: mark trees and blobs as UNINTERESTING,
> >> 2024-12-20) in a way to help when creating packfiles for a small commit
> >> range using the sparse path algorithm (enabled by pack.useSparse=true).
> > 
> > OK, in other words, the bug is fairly contained within the path-walk
> > traversal.  We treat things as reachable not just from ref tips and
> > reflogs (where path-walk code can use the tree object to compute on
> > what pathname each blob comes from) and the main index array (that
> > has paths, even though it needs separate way to compute than those
> > for trees), but also from places like REUC and TREE extensions that
> > make associations between pathnames and objects.  Are they also OK?
> 
> The key integration point is the "pending" list operating a bit
> different from walking directly from tags or commits. I was trying
> to reproduce the issue from all of those other sources before unlocking
> the "singleton" nature of the problem, and failed to do so.
> 
> The resolve-undo cache (REUC) is something that I had not tested
> previously. Adding "git rm --cached x/y" to the test in the previous
> case leads to the 'git fsck' call giving a "dangling blob" warning,
> so that could be an interesting way to strengthen the test. Thanks,

I also wonder a bit about the future -- if we ever add a new source for
pending objects, would the author have to amend "path-walk.c" to take
this new pending source into account?

I guess the answer is "yes", which does make me feel a bit uneasy as
it is very easy to now corrupt the repository.

Patrick

  reply	other threads:[~2025-08-21  8:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20 18:39 [PATCH 0/3] [2.51.0 Bug] Missing singleton objects in 'git repack -adf --path-walk' Derrick Stolee via GitGitGadget
2025-08-20 18:39 ` [PATCH 1/3] t7700: add failing --path-walk test Derrick Stolee via GitGitGadget
2025-08-21  8:00   ` Patrick Steinhardt
2025-08-21 12:42     ` Derrick Stolee
2025-08-21 16:22       ` Junio C Hamano
2025-08-21 23:21   ` Elijah Newren
2025-08-20 18:39 ` [PATCH 2/3] path-walk: fix setup of pending objects Derrick Stolee via GitGitGadget
2025-08-20 19:02   ` Junio C Hamano
2025-08-20 19:42     ` Derrick Stolee
2025-08-21  8:01       ` Patrick Steinhardt [this message]
2025-08-21 12:55         ` Derrick Stolee
2025-08-21  8:01   ` Patrick Steinhardt
2025-08-21 20:33     ` Derrick Stolee
2025-08-21 23:21   ` Elijah Newren
2025-08-20 18:39 ` [PATCH 3/3] path-walk: create initializer for path lists Derrick Stolee via GitGitGadget
2025-08-21 23:22   ` Elijah Newren
2025-08-25 12:49 ` [PATCH v2 0/2] [2.51.0 Bug] Missing singleton objects in 'git repack -adf --path-walk' Derrick Stolee via GitGitGadget
2025-08-25 12:49   ` [PATCH v2 1/2] path-walk: fix setup of pending objects Derrick Stolee via GitGitGadget
2025-08-25 12:49   ` [PATCH v2 2/2] path-walk: create initializer for path lists Derrick Stolee via GitGitGadget
2025-08-26 15:03   ` [PATCH v2 0/2] [2.51.0 Bug] Missing singleton objects in 'git repack -adf --path-walk' Elijah Newren
2025-08-26 15:58     ` Junio C Hamano
2025-09-02 11:19       ` Patrick Steinhardt

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=aKbSTN-rfGzadPsm@pks.im \
    --to=ps@pks.im \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=johncai86@gmail.com \
    --cc=jonathantanmy@google.com \
    --cc=karthik.188@gmail.com \
    --cc=kristofferhaugsbakk@fastmail.com \
    --cc=me@ttaylorr.com \
    --cc=newren@gmail.com \
    --cc=peff@peff.net \
    --cc=stolee@gmail.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;
as well as URLs for NNTP newsgroup(s).