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

Re: fetch: Auto-following tags should check connectivity, not existence

From
Junio C Hamano <junkio@cox.net>
Date
Apr 20, 2007, 10:30 UTC
Message-ID
<7vvefr1gnz.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7v4pnb4kil.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 12 quoted lines
> Johannes Sixt <J.Sixt@eudaptics.com> writes:
>
>> git-fetch's auto-following of tags fetches all tags for which it finds
>> objects in the local repository. I feel it were better if not object
>> existence, but connectivity to the existing refs was checked, like this:
> ...
> However, I think --max-count=1 defeats what you are trying to
> do.  Revision limiting will only look at commits, and if you
> have all commits that lead to the "$sha1" commit from some of
> the existing refs, but lack some blobs or trees that belong to
> some of the commits that are not the first commit that will be
> listed, their absense will not be noticed.

Sorry, but I have to take this back, after looking at your patch once again. In this case, all you are interested in is to see if the commit ancestry is connected, and you do not mind if the chain is somewhat incomplete in blobs and trees, as you will re-fetch the chain in a safe manner in the later round. In other words, the code does not have to be as strict as my quickfetch series, which tries to *omit* re-fetching altogether.

So --max-count=1 is fine, although it may not be much of an optimization in practice, it does not harm correctness in any way, as my previous message suggested.

Previous: Junio C Hamano
Message 3 of 3 in “fetch: Auto-following tags should check connectivity, not existence”
  1. Johannes SixtApr 17, 2007
  2. Junio C HamanoApr 20, 2007
  3. Junio C HamanoApr 20, 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.