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

Re: [PATCH 3/3] git-fetch: avoid local fetching from alternate (again)

From
Shawn O. Pearce <spearce@spearce.org>
Date
Nov 8, 2007, 10:00 UTC
Message-ID
<20071108100039.GM14735@spearce.org>
In-Reply-To
<20071108080058.GC16690@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> wrote:
Show 5 quoted lines
> Back in e3c6f240fd9c5bdeb33f2d47adc859f37935e2df Junio taught
> git-fetch to avoid copying objects when we are fetching from
> a repository that is already registered as an alternate object
> database.  In such a case there is no reason to copy any objects
> as we can already obtain them through the alternate.

I haven't figured it out yet but this patch seriously breaks t5515-fetch-merge-logic. For some reason the tag tag-three-file is not being included in .git/FETCH_HEAD as a not-for-merge ref, but all of the test vectors are expecting it to be present. Prior to this patch it was included and I don't think the test vectors are wrong.

If I run git-fetch from outside the test library it does the right thing and fetches this annotated tag pointing to a blob just fine. But during the test vector it never even mentions that tag as part of the status output, nor does it include it into .git/FETCH_HEAD. Its almost like the tag ain't there.

I'm starting to suspect heap corruption again in builtin-fetch. This patch alters the malloc() calls we are doing and may be shifting something around just enough in memory to cause a data overwrite or something and that's why this tag just drops out of the linked list? But then why does that happen in the test suite but not outside. Maybe because the test suite is setting environment variables that I'm not and the impact of those combined with these additional mallocs is what is breaking it? *sigh*

-- 
Shawn.
Previous: Shawn O. PearceNext: Junio C Hamano
Message 2 of 5 in “git-fetch: avoid local fetching from alternate (again)”
  1. 3/3 git-fetch: avoid local fetching from alternate (again)Shawn O. Pearce, Nov 8, 2007
  2. Shawn O. PearceNov 8, 2007
  3. Junio C HamanoNov 8, 2007
  4. Shawn O. PearceNov 8, 2007
  5. Shawn O. PearceNov 8, 2007

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.