# [PATCH] Fix git-checkout-script exit status

1 messages from 2005-08-23 to 2005-08-23. Participants: tony.luck@intel.com.
Thread: https://gitlist.dev/t/1628

## tony.luck@intel.com, 2005-08-23 21:03

Subject: [PATCH] Fix git-checkout-script exit status
Message-ID: <200508232103.j7NL3EV4025364@agluck-lia64.sc.intel.com>
URL: https://gitlist.dev/e/200508232103.j7NL3EV4025364%40agluck-lia64.sc.intel.com

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

Signed-off-by: Tony Luck <tony.luck@intel.com>

---

diff --git a/git-checkout-script b/git-checkout-script
--- a/git-checkout-script
+++ b/git-checkout-script
@@ -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

```
