summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2021-06-06 09:27:33 -0400
committerOri Bernstein <ori@eigenstate.org>2021-06-06 13:07:51 -0400
commitfb15534c78d06bce19233da20c2fe1d23ad0c447 (patch)
tree037d2729167d682f40a643632cda3e46cdfb88c8
parent78d2064a7c7fcf8a2e9d5bf356b44c1ecb902662 (diff)
downloadplan9front-fb15534c78d06bce19233da20c2fe1d23ad0c447.tar.xz
git/branch: revert optimization fully
it doesn't help *that* much, and confuses the code.
-rwxr-xr-xsys/src/cmd/git/branch11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/src/cmd/git/branch b/sys/src/cmd/git/branch
index ce7a3e59f..d132eb1e1 100755
--- a/sys/src/cmd/git/branch
+++ b/sys/src/cmd/git/branch
@@ -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