Code

git-apply: do not fail on binary diff when not applying nor checking.
[git.git] / git-branch.sh
index e2db9063d4c63288c5834046962290ff9dfca127..67f113acb9abc2bbcd444de42326854bdd88ba4a 100755 (executable)
@@ -102,4 +102,6 @@ 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"