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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 7, 2007, 20:32 UTC
Message-ID
<7vr6j1bxuf.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7vsl3iefoj.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 5 quoted lines
> Well spotted.  It would be a good idea to commit the big comment
> from contrib/examples/git-fetch.sh to fetch_local_nocopy()
> function, which would have made us realize that the patch does
> not refrain from applying this optimization even when shallow
> is in effect.  But I think that is actually a good change.
I take this back.  This regresses badly.
Why?

Because the optimization is useless when we are trying to deepen the shallow history. When you are trying to deepen a shallow history and the tips of remotes haven't moved since you fetched from there the last time, you have everything near the tip, and becuse your history is shallow, your ancestry chain is cauterized to make it appear that the history is complete. The rev-list reachability test would not fail as we expect.

The breakage can be seen with t5500.
Previous: Junio C HamanoNext: Shawn O. Pearce
Message 4 of 7 in “git-fetch: avoid local fetching from alternate (again)”
  1. git-fetch: avoid local fetching from alternate (again)Shawn O. Pearce, Nov 7, 2007
  2. Junio C HamanoNov 7, 2007
  3. Junio C HamanoNov 7, 2007
  4. Junio C HamanoNov 7, 2007
  5. Shawn O. PearceNov 8, 2007
  6. Shawn O. PearceNov 8, 2007
  7. Johannes SixtNov 7, 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.