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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/12/2015 07:59 AM, Paul Tan wrote:
> Calling git-pull --tags, and hitting the no merge candidates case,
> currently gives the following error message:
> 
>     It doesn't make sense to pull all tags; you probably meant:
>         git fetch --tags
> 
> [...]
> 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.
> Unless there is a reason why this special error message was kept?

Thanks for the bug report and the careful analysis.

I never use pull so I'm not really acquainted with its semantics. But it
seems to me that when you remove the special "--tags" error message, you
might also have to adjust the logic later in the function that looks at
"$#". Specifically, unless the presence of a "--tags" option can provide
candidates for merging, then in "[ $# -gt 1 ]", "$#" might need to be
changed to "the number of arguments *not including --tags arguments*".

Michael

-- 
Michael Haggerty
mhagger@xxxxxxxxxxxx

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]