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

Re: Unclear error message in "git remote update"

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 12, 2008, 05:10 UTC
Message-ID
<7vve3s7cjp.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<2008-03-09-13-37-55+trackit+sam@rfc1149.net>
Samuel Tardieu <sam@rfc1149.net> writes:
Show 19 quoted lines
> One of my colleague seems to have destroyed one of its head in his
> private repository. When fetching from it through "git remote update"
> using next, the repository name is not output:
>
> % git remote update
> error: refs/heads/2.0-uobjects points nowhere!
>
> Using master, I get:
>
> % git remote update
> Updating core
> Updating matthieu
> error: refs/heads/2.0-uobjects points nowhere!
> Updating origin
>
> which is IMO much clearer. Also, I like seeing what remote repository
> it is updating from in case anything gets stuck or slow.
>
> Any objection to reinstating the message as does the following patch?

I do not have objections, but it feels that the message for normal case (success) is cluttering the output.

If the remote repository is in a bad shape to solicit a "points nowhere" error, perhaps

 (1) that error message should be squelched out completely, as it does not
     affect the outcome of the fetch anyway, or
 (2) the dangling symref should cause "fetch" to error out but with a
     different error status than the total failure case, so that this
     caller can tell it is a non-grave error, or
 (3) the dangling symref should actually make the fetch fail, as the
     remote repository is corrupt.

For now I'll take your patch, but this is something we may want to clean-up in 1.6.0 timeframe.

Previous: Johannes Schindelin
Message 3 of 3 in “Unclear error message in "git remote update"”
  1. Samuel TardieuMar 9, 2008
  2. Johannes SchindelinMar 9, 2008
  3. Junio C HamanoMar 12, 2008

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.