shithub: git9

Download patch

ref: 6570330970cb35d1254758128110eef76140b067
parent: 434d68716062b098d92d7fdfc1bc2ffaf229a23b
author: Ori Bernstein <[email protected]>
date: Sat Dec 7 18:35:52 EST 2019

allow diff from outside root directory

--- a/diff
+++ b/diff
@@ -9,6 +9,7 @@
 
 gitup
 
+files=()
 branch=()
 summarize=()
 while(~ $1 -* && ! ~ $1 --){
@@ -21,13 +22,15 @@
 }
 if(~ $1 --)
 	shift
+if(! ~ $#* 0)
+	files=`{cleanname $gitrel/$*}
 if(~ $#branch 0)
 	branch=`{git/branch}
 if(~ $summarize 1){
-	git/walk -fMAR $*
+	git/walk -fMAR $files
 	exit
 }
-for(f in `{git/walk -cfMAR $*}){
+for(f in `{git/walk -cfMAR $files}){
 	orig=/mnt/git/branch/$branch/tree/$f
 	if(! test -f $orig)
 		orig=/dev/null