Skip to content

Commit

Permalink
pull: remove --tags error in no merge candidates case
Browse files Browse the repository at this point in the history
Since 441ed41 ("git pull --tags": error out with a better message.,
2007-12-28), git pull --tags would print a different error message if
git-fetch did not return any merge candidates:

   It doesn't make sense to pull all tags; you probably meant:
        git fetch --tags

This is because at that time, git-fetch --tags would override any
configured refspecs, and thus there would be no merge candidates. The
error message was thus introduced to prevent confusion.

However, since c5a84e9 (fetch --tags: fetch tags *in addition to*
other stuff, 2013-10-30), git fetch --tags would fetch tags in addition
to any configured refspecs. Hence, if any no merge candidates situation
occurs, it is not because --tags was set. As such, this special error
message is now irrelevant.

To prevent confusion, remove this error message.

Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Paul Tan authored and Junio C Hamano committed May 14, 2015
1 parent 3d4a3ff commit 19d122b
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions git-pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,6 @@ esac

error_on_no_merge_candidates () {
exec >&2
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

if test true = "$rebase"
then
Expand Down

0 comments on commit 19d122b

Please sign in to comment.