Browse Source

git-reset: detect update-ref error and report it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Junio C Hamano 19 years ago
parent
commit
dee4e384f3
  1. 5
      git-reset.sh

5
git-reset.sh

@ -52,7 +52,8 @@ then @@ -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 @@ -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

Loading…
Cancel
Save