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

From: Junio C Hamano <[email-masked]>
Date: Tue, 12 May 2015 10:23:19 -0700

Paul Tan <[email-masked]> writes:

> 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.