ref: ae4450b8dcb2e8f127ebad88d6f01fb0a18ee544
parent: 6bd7215355f1a2aa90c6166d3b2b6dae1f0711c2
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Oct 27 16:38:22 EDT 2023
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 '+'.
--- a/sys/src/cmd/git/diff
+++ b/sys/src/cmd/git/diff
@@ -20,7 +20,7 @@
files=`{cleanname -d $gitrel $*}
branch=`{git/query -p $commit}
-if(~ $summarize 1){
+if(~ $summarize 1 || ~ $uncommitted 1){
git/walk -f$filt $cparam $files
exit
}
--- a/sys/src/cmd/git/walk.c
+++ b/sys/src/cmd/git/walk.c
@@ -299,6 +299,8 @@
{
int i;
+ if(p == nil)
+ return 0;
if(npfx == 0)
return 1;
for(i = 0; i < npfx; i++){
--
⑨