git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] pull: remove --tags error in no merge candidates case

From
Paul Tan <pyokagan@gmail.com>
Date
May 13, 2015, 10:06 UTC
Message-ID
<1431511607-18251-1-git-send-email-pyokagan@gmail.com>
In-Reply-To
<xmqq38311zi0.fsf@gitster.dls.corp.google.com>

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>
---
 git-pull.sh | 9 ---------
 1 file changed, 9 deletions(-)
diff --git a/git-pull.sh b/git-pull.sh
index 9ed01fd..9005171 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -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
-- 
2.1.4
Previous: Junio C HamanoNext: Michael Haggerty
Message 3 of 5 in “git-pull --tags with no merge candidates case gives confusing error message”
  1. Paul TanMay 12, 2015
  2. Junio C HamanoMay 12, 2015
  3. pull: remove --tags error in no merge candidates casePaul Tan, May 13, 2015
  4. Michael HaggertyMay 12, 2015
  5. Paul TanMay 13, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.