Skip to content

Commit 19d122b

Browse files
pyokagangitster
authored andcommitted
pull: remove --tags error in no merge candidates case
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3d4a3ff commit 19d122b

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

git-pull.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,6 @@ esac
190190

191191
error_on_no_merge_candidates () {
192192
exec >&2
193-
for opt
194-
do
195-
case "$opt" in
196-
-t|--t|--ta|--tag|--tags)
197-
echo "It doesn't make sense to pull all tags; you probably meant:"
198-
echo " git fetch --tags"
199-
exit 1
200-
esac
201-
done
202193

203194
if test true = "$rebase"
204195
then

0 commit comments

Comments
 (0)