Skip to contentSkip to conversation

Fix git-checkout-script exit status

PATCH New [email protected] 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix git-checkout-script exit status

Sometimes the git-read-tree in git-checkout-script fails for me. Make sure that the failed status is passed up to caller.

---

git-checkout-script +2 -0
@@ -72,4 +72,6 @@ if [ "$?" -eq 0 ]; then
 	fi
 	[ "$branch" ] && ln -sf "refs/heads/$branch" "$GIT_DIR/HEAD"
 	rm -f "$GIT_DIR/MERGE_HEAD"
+else
+	exit 1
 fi