Code

git-reset: detect update-ref error and report it.
authorJunio C Hamano <junkio@cox.net>
Fri, 28 Jul 2006 05:27:44 +0000 (22:27 -0700)
committerJunio C Hamano <junkio@cox.net>
Fri, 28 Jul 2006 05:27:44 +0000 (22:27 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-reset.sh

index 5c0224090a252bed3258bbbb127e84e61a874197..36fc8ce25b39682ba256a8d39bf9a393907ef43d 100755 (executable)
@@ -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