force=1
;;
*)
- rev=$(git-rev-parse "$arg")
+ rev=$(git-rev-parse --verify --revs-only "$arg")
if [ -z "$rev" ]; then
echo "unknown flag $arg"
exit 1
exit 1
fi
new="$rev"
- if [ -f "$GIT_DIR/revs/heads/$arg" ]; then
+ if [ -f "$GIT_DIR/refs/heads/$arg" ]; then
branch="$arg"
fi
;;