git/{branch,pull}: merge files correctly
merge1 would clobber the global '$base' variable, which is not what we wanted. Run it in a subshell with its own env.
This commit is contained in:
parent
5d06e7ad66
commit
a5282f9eab
1 changed files with 4 additions and 2 deletions
|
@ -40,7 +40,8 @@ fn present {
|
|||
}
|
||||
|
||||
# merge1 out theirs base ours
|
||||
fn merge1 {
|
||||
fn merge1 {@{
|
||||
rfork e
|
||||
n=$pid
|
||||
out=$1
|
||||
theirs=$2
|
||||
|
@ -59,7 +60,7 @@ fn merge1 {
|
|||
if(! test -f $theirs)
|
||||
theirs=/dev/null
|
||||
if(! ape/diff3 -3 -m $ours $base $theirs > $tmp)
|
||||
echo merge needed: $out
|
||||
echo merge needed: $out >[1=2]
|
||||
|
||||
if(present $ours $base $theirs){
|
||||
mv $tmp $out
|
||||
|
@ -69,6 +70,7 @@ fn merge1 {
|
|||
rm -f $tmp $out
|
||||
git/rm $out
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn gitup{
|
||||
|
|
Loading…
Reference in a new issue