From: Paul Tan <pyokagan@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
Michael Haggerty <mhagger@alum.mit.edu>
Cc: Git List <git@vger.kernel.org>
Subject: git-pull --tags with no merge candidates case gives confusing error message
Date: Tue, 12 May 2015 13:59:04 +0800 [thread overview]
Message-ID: <CACRoPnQvNvBv1_wBzWQH6A8XRvWZ+HURvtkqtgYpwjjNXuCERg@mail.gmail.com> (raw)
Hi all,
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
This error message comes from the following code block in git-pull.sh:
for opt
do
case "$opt" in
-t|--t|--ta|--tag|--tags)
echo "It doesn't make sense to pull all tags; you probably meant:"
echo " git fetch --tags"
exit 1
esac
done
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:
(1) behave as if no --tags was given (so an explicit refspec on
the command line overrides configured ones, or no explicit
refspecs on the command line takes configured ones); but
(2) no auto-following of tags is made even when using
configured refspecs; and
(3) fetch all tags as not-for-merge entries".
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.
Unless there is a reason why this special error message was kept?
Thanks,
Paul
next reply other threads:[~2015-05-12 5:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 5:59 Paul Tan [this message]
2015-05-12 17:23 ` git-pull --tags with no merge candidates case gives confusing error message Junio C Hamano
2015-05-13 10:06 ` [PATCH] pull: remove --tags error in no merge candidates case Paul Tan
2015-05-12 19:52 ` git-pull --tags with no merge candidates case gives confusing error message Michael Haggerty
2015-05-13 10:13 ` Paul Tan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACRoPnQvNvBv1_wBzWQH6A8XRvWZ+HURvtkqtgYpwjjNXuCERg@mail.gmail.com \
--to=pyokagan@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mhagger@alum.mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).