Skip to content

Commit

Permalink
git/branch: fix copy-paste error
Browse files Browse the repository at this point in the history
set b, not a...
  • Loading branch information
oridb committed May 31, 2021
1 parent da89a1d commit 2178b18
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions branch
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,23 @@ if(! ~ $#stay 0)
basedir=`{git/query -p $base}
dirtypaths=()
cleanpaths=($modified $deleted)
cleandirs=`$nl{echo $nl^$cleanpaths | sed 's@/[^/]+/?$@@' | uniq}
if(! ~ $#modified 0 || ! ~ $#deleted 0)
if(! ~ $#modified 0 || ! ~ $#deleted 0){
echo WUT
dirtypaths=`$nl{git/walk -cfRMA $modified $deleted}
}
if(! ~ $#dirtypaths 0){
x=$nl^$cleanpaths
y=$nl^$dirtypaths
cleanpaths=`$nl{echo $"x$nl$"y | sort | uniq -u}
cleandirs=`$nl{echo $nl^$cleanpaths | sed 's@/[^/]+/?$@@' | uniq}
}
if(! ~ $#cleanpaths 0)
cleandirs=`$nl{echo $nl^$cleanpaths | sed 's@/[^/]+/?$@@' | uniq}
if(! ~ $#cleandirs 0){
mkdir -p $cleandirs
mkdir -p .git/index9/tracked/$cleandirs
}
echo clean: $#clean
echo dirty: $#dirty
for(m in $cleanpaths){
# Modifications can turn a file into
# a directory, or vice versa, so we
Expand All @@ -89,7 +93,7 @@ for(m in $cleanpaths){
if(test -f $m)
a=file
if(test -f $basedir/tree/$m)
a=file
b=file
if(! ~ $a $b){
rm -rf $m
rm -rf .git/index9/tracked/$m
Expand Down

0 comments on commit 2178b18

Please sign in to comment.