ref: ec707628ca8f461a1088a2a9e07bd89f0990338f
parent: 7cea6be90dc64c7037bc25ccb5d3473e3bd261d7
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Dec 7 01:58:38 EST 2019
add '-s' option to git/diff, for summarizing status.
--- a/diff
+++ b/diff
@@ -9,24 +9,25 @@
gitup
+branch=()
+summarize=()
while(~ $1 -* && ! ~ $1 --){
switch($1){
case -b; branch=`{git/query $2}; shift
+ case -s; summarize=1
case *; usage
}
shift
}
-if(~ $1 --) shift
-
+if(~ $1 --)
+ shift
if(~ $#branch 0)
branch=`{git/branch}
-
-if(~ $#* 0)
- dirty=`{git/walk -cfMAR}
-if not
- dirty=`{git/walk -cfMAR $*}
-
-for(f in $dirty){
+if(~ $summarize 1){
+ git/walk -fMAR $*
+ exit
+}
+for(f in `{git/walk -cfMAR $*}){
orig=/mnt/git/branch/$branch/tree/$f
if(! test -f $orig)
orig=/dev/null
--- a/git.1
+++ b/git.1
@@ -46,6 +46,9 @@
.I branch
]
[
+.B -s
+]
+[
.I file...
]
.PP
@@ -305,6 +308,10 @@
.I base
instead of
.I HEAD.
+When passed the
+.I -s
+option, only a the file statuses are
+printed.
.PP
.B Git/export