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.