shithub: riscv

Download patch

ref: 2367a2aeaec8432e6b059135e49c2fa86e415ae5
parent: beeb05420952a3ca106bcc3395ecb9c974b4f464
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Feb 9 20:33:36 EST 2022

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

--- a/sys/src/cmd/git/branch
+++ b/sys/src/cmd/git/branch
@@ -48,7 +48,7 @@
 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'
 }