git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: What's cooking in git.git (Oct 2025, #12; Thu, 30)

From
Jeff King <peff@peff.net>
Date
Nov 3, 2025, 21:30 UTC
Message-ID
<20251103213059.GA2528366@coredump.intra.peff.net>
In-Reply-To
<xmqq7bw6ubaw.fsf@gitster.g>
On Mon, Nov 03, 2025 at 12:10:47PM -0800, Junio C Hamano wrote:
Show 10 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> 
> > Bisect points at 054f5f45 (ref-filter: parse objects on demand,
> > 2025-10-23), which is unfortunate, as that is the motivating step of
> > the whole topic.
> 
> Here is a fairly simple reproduction.  It appears that this does not
> require the refs to be packed (i.e., "t7004-tag.sh -i -v" fails
> after saying "*** Loose ***" here, without moving to the packed
> test).

I think the issue is that nobody ever resets data->maybe_object. So it is left cached with the very first object that gets looked up.

Something like this seems to fix it, but there may be a better place to do the reset.

diff --git a/ref-filter.c b/ref-filter.c
index 7cfcd5c355..4c174f7ecc 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -2124,6 +2124,8 @@ static int grab_values(struct atom_value *val, int deref, struct expand_data *da
 	void *buf = data->content;
 	int ret;
 
+	data->maybe_object = NULL;
+
 	switch (data->type) {
 	case OBJ_TAG:
 		ret = grab_tag_values(val, deref, data, refname, err, eaten);

-Peff
Previous: Junio C HamanoNext: Patrick Steinhardt
Message 9 of 10 in “What's cooking in git.git (Oct 2025, #12; Thu, 30)”
  1. Junio C HamanoOct 30, 2025
  2. Patrick SteinhardtOct 31, 2025
  3. Junio C HamanoOct 31, 2025
  4. Eric SunshineOct 31, 2025
  5. Lucas Seiki OshiroNov 3, 2025
  6. Junio C HamanoNov 3, 2025
  7. Junio C HamanoNov 3, 2025
  8. Junio C HamanoNov 3, 2025
  9. Jeff KingNov 3, 2025
  10. Patrick SteinhardtNov 4, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.