shithub: riscv

Download patch

ref: 78d2064a7c7fcf8a2e9d5bf356b44c1ecb902662
parent: a2a0717c99ab60bc0d7814fa22230013f9347c22
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Jun 6 05:11:10 EDT 2021

git/branch: somewhere in the syncing, the fix for junk files was lost

bring it back.

--- a/sys/src/cmd/git/branch
+++ b/sys/src/cmd/git/branch
@@ -74,8 +74,11 @@
 	y=$nl^$dirtypaths
 	cleanpaths=`$nl{echo $"x$nl$"y | sort | uniq -u}
 }
+
+# creating the dirs with a single
+# batch mkdir was significantly faster.
 if(! ~ $#cleanpaths 0)
-	cleandirs=`$nl{echo $nl^$cleanpaths | sed 's@/[^/]+/?$@@' | uniq}
+	cleandirs=`$nl{for(p in $cleanpaths) basename -d $p | uniq -u}
 if(! ~ $#cleandirs 0){
 	mkdir -p $cleandirs
 	mkdir -p .git/index9/tracked/$cleandirs