~ori/git9

d257e6478745710e03fa8699bc0b367bf7c0b8e8 — Ori Bernstein 3 years ago 87c0ea5
git/branch: diff clean and dirty correctly

no spaces in our lists.
1 files changed, 9 insertions(+), 5 deletions(-)

M branch
M branch => branch +9 -5
@@ 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