summarylogtreecommitdiffstats
path: root/git-diff-image.patch
blob: 82f7bb231eb2a12b33f01acab7693317a90553b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
diff --git a/diff-image b/diff-image
index 0f6a316..137eacd 100755
--- a/diff-image
+++ b/diff-image
@@ -134,7 +134,7 @@ exif()
 
 diff_clean_names()
 {
-    diff -u "$1" --label "$name1" "$2" --label "$name2" || true
+    diff -u --color=always "$1" --label "$name1" "$2" --label "$name2"
 }
 
 
@@ -143,13 +143,13 @@ if which exiftool > /dev/null
 then
   d1="$(exif "$f1")"
   d2="$(exif "$f2")"
-  diff_clean_names "$d1" "$d2"
+  diff_clean_names "$d1" "$d2" && diff_clean_names "$f1" "$f2" || true
   set +e
   diff -q "$d1" "$d2" >/dev/null
   exifdiff=$?
   set -e
 else
-  diff_clean_names "$f1" "$f2"
+  diff_clean_names "$f1" "$f2" || true
 fi
 
 if $exif_only
@@ -208,7 +208,7 @@ fi
 density_flag=
 do_compare()
 {
-  if which gm > /dev/null
+  if compare --version | head -1 | grep -q "GraphicsMagick"
   then
     echo "NOTICE: GraphicsMagick does not support 'compare -fuzz', so omitting it"
     compare $density_flag $color_flag $backgroundcolor_flag -file png:- "$f1" "$f2" | \