threads / patch / 1628

patchFix git-checkout-script exit status

Subject: [PATCH] Fix git-checkout-script exit status

## tl;dr

One message between Aug 23, 2005 and Aug 23, 2005. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

tony.luck@intel.com· Aug 23, 2005, 21:03 UTC · lore

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>
---
Show changes to git-checkout-script +2 −0
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

← back to recent threads