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 $*