git/branch: diff clean and dirty lists correctly
no spaces in our lists.
This commit is contained in:
parent
fb15534c78
commit
ce30e785b1
1 changed files with 9 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue