]> git.lizzy.rs Git - plan9front.git/commitdiff
git/branch: revert optimization fully
authorOri Bernstein <ori@eigenstate.org>
Sun, 6 Jun 2021 13:27:33 +0000 (09:27 -0400)
committerOri Bernstein <ori@eigenstate.org>
Sun, 6 Jun 2021 17:07:51 +0000 (13:07 -0400)
it doesn't help *that* much, and confuses the code.

sys/src/cmd/git/branch

index ce7a3e59f78b9d0b2f846a7e123442d2cac7db40..d132eb1e1dba57a3689ed2d1e4f7985cd563db90 100755 (executable)
@@ -75,16 +75,11 @@ if(! ~ $#dirtypaths 0){
        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{for(p in $cleanpaths) basename -d $p | uniq -u}
-if(! ~ $#cleandirs 0){
-       mkdir -p $cleandirs
-       mkdir -p .git/index9/tracked/$cleandirs
-}
 echo $commit > .git/$new
 for(m in $cleanpaths){
+       d=`$nl{basename -d $m}
+       mkdir -p $d
+       mkdir -p .git/index9/tracked/$d
        # Modifications can turn a file into
        # a directory, or vice versa, so we
        # need to delete and copy the files