Skip to contentSkip to conversation

Fix "git-fetch --tags" exit status when nothing has been changed

PATCH New Sergey Vlasov 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix "git-fetch --tags" exit status when nothing has been changed

After commit 55b7835e1b81a6debc7648149d2b8a4c5c64ddba git-fetch --tags exits with status 1 when no tags have been changed, which breaks calling git-fetch from scripts.

---
 git-fetch.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
git-fetch.sh +1 -1
index ff17699..ee99280 100755
@@ -153,7 +153,7 @@ fast_forward_local () {
 	then
 		if now_=$(cat "$GIT_DIR/$1") && test "$now_" = "$2"
 		then
-			[ "$verbose" ] && echo >&2 "* $1: same as $3"
+			[ "$verbose" ] && echo >&2 "* $1: same as $3" ||:
 		else
 			echo >&2 "* $1: updating with $3"
 			git-update-ref -m "$rloga: updating tag" "$1" "$2"
Signature · 1 line
1.4.1.ga319