ref: a401d8120e5d4e8fdf07fb2b7318b0fe5d2a9d53
parent: 26a6c4ef229b379c8eb060afb302d09c6efefb94
author: glenda <glenda@9front.local>
date: Sat Jun 5 14:50:20 EDT 2021
git/branch: merge correct set of files we were switching branches before we got the full list of modified files, which could garble what we were trying to merge.
--- a/sys/lib/git/common.rc
+++ b/sys/lib/git/common.rc
@@ -44,9 +44,9 @@
rfork e
n=$pid
out=$1
- theirs=$2
+ ours=$2
base=$3
- ours=$4
+ theirs=$4
tmp=$out.tmp
while(test -f $tmp){tmp=$tmp.$n
@@ -70,8 +70,7 @@
rm -f $tmp $out
git/rm $out
}
- }
-}
+}}
fn gitup{ gitroot=`{git/conf -r >[2]/dev/null}--- a/sys/src/cmd/git/branch
+++ b/sys/src/cmd/git/branch
@@ -60,9 +60,10 @@
commit=`{git/query $base} || die 'branch does not exist:' $baseif(~ $new */*)
mkdir -p .git/`{basename -d $new}-echo $commit > .git/$new
-if(! ~ $#stay 0)
+if(! ~ $#stay 0){+ echo $commit > .git/$new
exit
+}
basedir=`{git/query -p $base}dirtypaths=()
cleanpaths=($modified $deleted)
@@ -79,6 +80,7 @@
mkdir -p $cleandirs
mkdir -p .git/index9/tracked/$cleandirs
}
+echo $commit > .git/$new
for(m in $cleanpaths){# Modifications can turn a file into
# a directory, or vice versa, so we
--
⑨