ref: 744bae0fe30bbdf7a60512da39757c54acfec376
parent: 2e97d8f148c9eacc7d2beb27c426d175e7e78386
author: glenda <glenda@jasnah>
date: Sun Jul 2 22:33:55 EDT 2023
git/diff: always respect the specified branch
--- a/sys/src/cmd/git/diff
+++ b/sys/src/cmd/git/diff
@@ -16,21 +16,15 @@
branch=`{git/query -p $commit}
if(~ $summarize 1){
- git/walk -fMAR $files
+ git/walk -fMAR -b $commit $files
exit
}
-fn lsdirty {
- git/walk -c -fRMA $files
- if(! ~ $commit HEAD)
- git/query -c $commit HEAD | subst '^..'
-}
-
showed=()
mntgen /mnt/scratch
bind $branch/tree/ /mnt/scratch/a
bind . /mnt/scratch/b
-for(f in `$nl{lsdirty | sort | uniq}){
+for(f in `$nl{git/walk -c -fRMA -b $commit $files}){
if(~ $#showed 0){
echo diff `{git/query $commit} uncommitted
showed=1
--
⑨