git/branch: diff clean and dirty lists correctly

no spaces in our lists.
This commit is contained in:
Ori Bernstein 2021-06-06 11:57:31 -04:00
parent fb15534c78
commit ce30e785b1

View file

@ -66,13 +66,17 @@ if(! ~ $#stay 0){
}
basedir=`{git/query -p $base}
dirtypaths=()
cleanpaths=($modified $deleted)
if(! ~ $#modified 0 || ! ~ $#deleted 0)
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}
if(! ~ $#modified 0 || ! ~ $#deleted 0)
dirtypaths=`$nl{git/walk -cfRMA $modified $deleted}
if(~ $#dirtypaths 0)
cleanpaths=($modified $deleted)
if not {
cleanpaths=()
for(p in $modified $deleted)
if(! ~ $p $dirtypaths)
cleanpaths=($cleanpaths $p)
}
echo $commit > .git/$new