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

Re: git-pull --tags with no merge candidates case gives confusing error message

From
Junio C Hamano <gitster@pobox.com>
Date
May 12, 2015, 17:23 UTC
Message-ID
<xmqq38311zi0.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CACRoPnQvNvBv1_wBzWQH6A8XRvWZ+HURvtkqtgYpwjjNXuCERg@mail.gmail.com>
Paul Tan <pyokagan@gmail.com> writes:
Show 17 quoted lines
> This behavior was introduced in 441ed41 ("git pull --tags": error out
> with a better message., 2007-12-28), which stated that:
>
>     In the longer term, it would be a better approach to change the
>     semantics of --tags option to make "git fetch" and "git pull"
>     to:
>     ...
>     Then we would not need to have this separate error message, as
>     the ordinary merge will happen even with the --tags option.
>
> Given that as of c5a84e9 (fetch --tags: fetch tags *in addition to*
> other stuff, 2013-10-30), git-pull --tags will fetch tags in addition
> to the configured refspecs, so if there are no merge candidates, it
> would not be because --tags was specified on the command line.
>
> As such, I wonder if the error message should be removed, since it
> conceals the actual reason of why there are no merge candidates.

I love it when people carefully analyse why the things are in the way they are, and some things no longer make sense in today's world order.

I agree 100% with your analysis. c5a84e9 should have tweaked this part, but was not careful enough, and made the heuristic used in 441ed41 when diagnosing the error is a bad one now. It should go.

Previous: Paul TanNext: Paul Tan
Message 2 of 5 in “git-pull --tags with no merge candidates case gives confusing error message”
  1. Paul TanMay 12, 2015
  2. Junio C HamanoMay 12, 2015
  3. pull: remove --tags error in no merge candidates casePaul Tan, May 13, 2015
  4. Michael HaggertyMay 12, 2015
  5. Paul TanMay 13, 2015

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.