git/branch: fix order of operations (thanks qwx)

This commit is contained in:
Ori Bernstein 2022-02-10 01:33:36 +00:00
parent beeb054209
commit 2367a2aeae

View file

@ -48,7 +48,7 @@ if(~ $#newbr 0){
modified=`$nl{git/query -c HEAD $base | grep '^[^-]' | subst '^..'}
deleted=`$nl{git/query -c HEAD $base | grep '^-' | subst '^..'}
if(! ~ $#modified 0 || ! ~ $#deleted 0 && ~ $#merge 0){
if(! ~ $#modified 0 || {! ~ $#deleted 0 && ~ $#merge 0}){
git/walk -fRMA $modified $deleted ||
die 'uncommited changes would be clobbered'
}