summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-07-28 05:27:44 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-28 05:27:44 (GMT)
commitdee4e384f376020e08cb78f6dfaf00ae84e97a9e (patch)
tree9a9547524c785a9ba4d053341cf839b3259aa565
parent5f468c4805c785115cd9c5f6a8f299f23a9034f5 (diff)
downloadgit-dee4e384f376020e08cb78f6dfaf00ae84e97a9e.zip
git-dee4e384f376020e08cb78f6dfaf00ae84e97a9e.tar.gz
git-dee4e384f376020e08cb78f6dfaf00ae84e97a9e.tar.bz2
git-reset: detect update-ref error and report it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xgit-reset.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-reset.sh b/git-reset.sh
index 5c02240..36fc8ce 100755
--- a/git-reset.sh
+++ b/git-reset.sh
@@ -52,7 +52,8 @@ then
else
rm -f "$GIT_DIR/ORIG_HEAD"
fi
-git-update-ref -m "reset $reset_type $@" HEAD "$rev"
+git-update-ref -m "reset $reset_type $*" HEAD "$rev"
+update_ref_status=$?
case "$reset_type" in
--hard )
@@ -66,3 +67,5 @@ case "$reset_type" in
esac
rm -f "$GIT_DIR/MERGE_HEAD" "$GIT_DIR/rr-cache/MERGE_RR" "$GIT_DIR/SQUASH_MSG"
+
+exit $update_ref_status