diff options
author | Junio C Hamano <junkio@cox.net> | 2005-11-03 15:45:36 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-03 15:45:36 -0800 |
commit | 6ddc0964034342519a87fe013781abf31c6db6ad (patch) | |
tree | 74cc863556a42d41e2bf8dec45e6fd33ed312228 /git-checkout.sh | |
parent | 235d521da60e4699e5bd59ac658b5b48bd76ddca (diff) | |
parent | 2be8fd085e865097fa0908fe1a94c8edf9cde7f5 (diff) |
GIT 0.99.9cv0.99.9c
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-checkout.sh')
-rwxr-xr-x | git-checkout.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/git-checkout.sh b/git-checkout.sh index cb33fdc7e2..4c08f36b59 100755 --- a/git-checkout.sh +++ b/git-checkout.sh @@ -126,7 +126,9 @@ fi # if [ "$?" -eq 0 ]; then if [ "$newbranch" ]; then - echo $new > "$GIT_DIR/refs/heads/$newbranch" + leading=`expr "refs/heads/$newbranch" : '\(.*\)/'` && + mkdir -p "$GIT_DIR/$leading" && + echo $new >"$GIT_DIR/refs/heads/$newbranch" || exit branch="$newbranch" fi [ "$branch" ] && |