ref: 560ba40d676e8af4fdc5c8d3018084b0ddcb991a
parent: 42c2c790478e3ac433c20a0d30a74d5ddd2c46f3
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Jan 28 23:36:12 EST 2021
git/branch: merge against right commit.
--- a/branch
+++ b/branch
@@ -29,6 +29,7 @@
if not
new=refs/heads/$branch
+orig=`{git/query HEAD}
if (~ $#baseref 1)
base=`{git/query $baseref} || exit 'bad base'
if not if(test -e .git/$new)
@@ -57,14 +58,9 @@
die could not find branch $branch
}
commit=`{git/query $base} || die 'branch does not exist:' $base
-echo updating $new to $commit
-
if(~ $new */*)
mkdir -p .git/`{basename -d $new}
-
echo $commit > .git/$new
-
-
if(! ~ $#stay 0)
exit
@@ -95,7 +91,7 @@
}
}
for(ours in $dirtypaths){
- common=/mnt/git/HEAD/tree/$ours
+ common=/mnt/git/object/$orig/tree/$ours
theirs=/mnt/git/object/$base/tree/$ours
n=$pid
tmp=$ours.tmp
@@ -109,8 +105,8 @@
theirs=/dev/null
if(! test -f $common)
common=/dev/null
- echo M $ours
- if(! ape/diff3 -m $ours $common $theirs > $tmp)
+ echo merging $ours...
+ if(! ape/diff3 -3 -m $ours $common $theirs > $tmp)
echo ' 'merge needed: $ours
echo > .git/index9/tracked/$ours
mv $tmp $ours
--- a/merge
+++ b/merge
@@ -19,7 +19,7 @@
base=/dev/null
if(! test -f $theirbr/$f)
theirs=/dev/null
- if(! ape/diff3 -m $ours $base $theirs > $f)
+ if(! ape/diff3 -3 -m $ours $base $theirs > $f)
echo merge needed: $f
if(test -f $f)