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

Re: [PATCH] fetch: show reference pointed by new tags

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 8, 2016, 04:28 UTC
Message-ID
<xmqqd1r5mw4p.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<xmqqwppfrtai.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 14 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
> But I am merely guessing from the your patch text what the reasoning
> behind the change was and you are the one who had the original
> reason why you needed this change, so your "why" may be a lot more
> useful use case than the one I made up and called "semi-sensible"
> here.  The proposed log message needs to explain your "why".
>
> And if you explained "why", you may have heard other people agreeing
> with you that this new piece of information is nice to have.  They
> may even have helped you by suggesting to add this extra information
> somewhere in the output, instead of replacing existing information
> in the output (which would lead to loss of convenience and
> information).

I just thought of another possible explanation why you may have thought that it is a good idea to clobber the right hand side of the fetch report. Perhaps you thought that LHS and RHS say the same thing and that is redundant?

Because "git fetch" is flexible and allows you to store what the remote side called X locally as Y, the fetch report in the most general form must say X on the remot side) was fetched and stored as Y in the local repository, i.e.

	[new tag] X -> Y

but it is excusable that people new to Git who never saw such a renaming fetch to misunderstand that we are giving redundant information.

If that was the motivation, a possible way to change the behaviour would be to show

	[new tag] X

if and only if the remote side and the local side uses exactly the sae name for the ref. The lack of " -> " can clearly tell the user that the output is telling us that what they call X is fetched and stored as X (i.e. under the same name) locally. A fetched ref that does not update any local ref (i.e. the ones that are recorded only in the FETCH_HEAD file) is shown as

	tag X -> FETCH_HEAD
so there is no ambiguity there, either.
Previous: Junio C HamanoNext: Eric Engestrom
Message 4 of 5 in “fetch: show reference pointed by new tags”
  1. fetch: show reference pointed by new tagsEric Engestrom, Mar 6, 2016
  2. Junio C HamanoMar 7, 2016
  3. Junio C HamanoMar 7, 2016
  4. Junio C HamanoMar 8, 2016
  5. Eric EngestromMar 13, 2016

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.