;;
*)
rev=$(git-rev-parse --verify "$arg^0" 2>/dev/null) ||
- die "hey dummy, branch '$arg' doesn't exist."
+ die "I don't know any '$arg'."
if [ -z "$rev" ]; then
echo "unknown flag $arg"
exit 1
echo $new > "$GIT_DIR/refs/heads/$newbranch"
branch="$newbranch"
fi
- [ "$branch" ] && ln -sf "refs/heads/$branch" "$GIT_DIR/HEAD"
+ [ "$branch" ] &&
+ GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD "refs/heads/$branch"
rm -f "$GIT_DIR/MERGE_HEAD"
else
exit 1