minor fixes
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Mon, 20 Dec 2021 03:25:07 +0000 (14:25 +1100)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Mon, 20 Dec 2021 03:25:07 +0000 (14:25 +1100)
git-differ

index 6fcf790738f10bdc7672efe46b7142adfec1aab4..437a6b53ce398d162ecef1d00722e2f1a9d1b2f5 100755 (executable)
@@ -6,13 +6,14 @@
 EXT="${4##*.}"
 
 case "$EXT" in
-    png|jpg|bmp)
+    svg|png|jpg|bmp|gif)
        F1=$(mktemp --suffix=$EXT)
-       git cat-file -p $1:$4 > $F1
        F2=$(mktemp --suffix=$EXT)
-       git cat-file -p $2:$4 > $F2
-       montage $F1 $F2 -tile 2x1 -geometry +5+5 -border 2  png:- | display -
-       rm -f $F1 $F2
+       git cat-file -p $1:$4 > $F1 || F1="label:CREATED >>> "
+       git cat-file -p $2:$4 > $F2 || F2="label: >>> DELETED"
+       montage -label '' "$F1" "$F2" \
+               -tile 2x1 -geometry +5+5 -border 2  png:- | display -
+       rm -f "$F1" "$F2"
        ;;
     *)
        git meld $*