shithub: git9

Download patch

ref: e4586ad2fddd7ab83e3d4329ccde824ed5526c7e
parent: f618f707ba822d0096febc40844810def7ab59cf
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Mar 24 00:11:06 EDT 2020

use correct paths when merging

We were checking correctly if the files existed, and then
dropping the results of that check on the floor. Fix
that.

--- a/merge
+++ b/merge
@@ -14,6 +14,9 @@
 	all=`{walk -f $ourbr $basebr $theirbr | \
 		 sed 's@^('$ourbr'|'$basebr'|'$theirbr')/*@@g' | sort | uniq}
 	for(f in $all){
+		ours=$ourbr/$f
+		base=$basebr/$f
+		theirs=$thierbr/$f
 		if(! test -f $ourbr/$f)
 			ours=/dev/null
 		if(! test -f $basebr/$f)
@@ -20,7 +23,7 @@
 			base=/dev/null
 		if(! test -f $theirbr/$f)
 			theirs=/dev/null
-		if(! ape/diff3 -m $ourbr/$f $basebr/$f $theirbr/$f > $f)
+		if(! ape/diff3 -m $ours $base $theirs > $f)
 			echo merge needed: $f
 	}
 }