ref: caf5192dd342460e8685a113c48ee5fa06587292
parent: ee74d9640a929c4f464dba51079820150eb8e374
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Apr 7 22:37:03 EDT 2020
create remote dir when pushing if we push to a new remote, we'll fail to update the reference, because the directory containing the remote branches doesn't exit. creating it before writing to it fixes this.
--- a/push
+++ b/push
@@ -55,6 +55,7 @@
refpath=`{echo $u(2) | sed 's@^refs/heads/@.git/refs/remotes/'$upstream'/@g'}
switch($u(1)){
case update;
+ mkdir -p `{basename -d $refpath}
echo $u(4) > $refpath
echo $u(2)^':' $u(3) '=>' $u(4)
case delete;