diff options
Diffstat (limited to 'git-branch.sh')
-rwxr-xr-x | git-branch.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/git-branch.sh b/git-branch.sh index 67f113acb9..11d52fd78e 100755 --- a/git-branch.sh +++ b/git-branch.sh @@ -102,6 +102,5 @@ rev=$(git-rev-parse --verify "$head") || exit git-check-ref-format "heads/$branchname" || die "we do not like '$branchname' as a branch name." -leading=`expr "refs/heads/$branchname" : '\(.*\)/'` && -mkdir -p "$GIT_DIR/$leading" && -echo $rev > "$GIT_DIR/refs/heads/$branchname" +git update-ref "refs/heads/$branchname" $rev + |