shithub: riscv

Download patch

ref: 466cf20d3524b8e42edc333a6d2df2a01e99a95b
parent: c9309329eb31b7d739cf2590592e441cc08f4c5f
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Oct 29 15:56:13 EDT 2023

git/branch: avoid null list errors

--- a/sys/src/cmd/git/branch
+++ b/sys/src/cmd/git/branch
@@ -52,7 +52,7 @@
 if(~ $delete 1 && ~ `{git/query HEAD} `{git/query $branch})
 	die 'cannot delete current branch'
 # if we're not merging, don't clobber existing changes.
-if(~ $#merge 0 && ! $delete){
+if(~ $#merge 0 && ~ $#delete 0){
 	if(! ~ $#modified 0 || ! ~ $#deleted 0){
 		git/walk -fRMA $modified $deleted || 
 			die 'uncommitted changes would be clobbered'