git/diff: make '-u' flag imply '-s'

Without '-s', '-u' makes no sense: it acts like
a weird version of cat that prepends each line
with '+'.
This commit is contained in:
Ori Bernstein 2023-10-27 20:38:22 +00:00
parent 5d68e51152
commit 7bc6d45519
2 changed files with 3 additions and 1 deletions

View file

@ -20,7 +20,7 @@ if(! ~ $#* 0)
files=`{cleanname -d $gitrel $*}
branch=`{git/query -p $commit}
if(~ $summarize 1){
if(~ $summarize 1 || ~ $uncommitted 1){
git/walk -f$filt $cparam $files
exit
}

View file

@ -299,6 +299,8 @@ pfxmatch(char *p, char **pfx, int *pfxlen, int npfx)
{
int i;
if(p == nil)
return 0;
if(npfx == 0)
return 1;
for(i = 0; i < npfx; i++){