ref: 5833dc1367d7ade5680bad3cffb0708251e00754
parent: f88cc3548c8afb04890d4d9380432e4ff61ac060
author: Ori Bernstein <[email protected]>
date: Fri Oct 18 23:03:29 EDT 2019
Only update the branch afer successfully checking out the files.
--- a/branch
+++ b/branch
@@ -79,10 +79,10 @@
if(! ~ $#stay 0)
exit
-echo ref: $new > .git/HEAD
modified=`$nl{git/query -c HEAD $base | grep '^[+~]' | sed 's/^..//'}
deleted=`$nl{git/query -c HEAD $base | grep '^-' | sed 's/^..//'}
+
if(! ~ $#modified 0 || ! ~ $#deleted 0){
if(! git/walk -q $modified $deleted){
echo remote changes would clobber local changes >[1=2]
@@ -107,3 +107,5 @@
rm -f $deleted
rm -f .git/index9/tracked/$deleted
}
+
+echo ref: $new > .git/HEAD