Skip to content

Commit

Permalink
image diff tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Nov 17, 2023
1 parent 252ba97 commit 2291ff1
Show file tree
Hide file tree
Showing 3 changed files with 7,244 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@

*.gif diff=image
*.jpeg diff=image
*.jpg diff=image
*.png diff=image

6 changes: 4 additions & 2 deletions bin/diff-image
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ do
color="$OPTARG"
;;
e)
exif_only=true
exif_only=false
;;
f)
fuzz="$OPTARG"
Expand Down Expand Up @@ -134,7 +134,7 @@ exif()

diff_clean_names()
{
diff -u "$1" --label "$name1" "$2" --label "$name2" || true
git --no-pager diff --no-index --color-words "$1" "$2" || true
}


Expand Down Expand Up @@ -278,7 +278,9 @@ else
echo "Copy diff image to $outputPath"
cp "$destfile" "$outputPath"
else
echo "Showing " "$destfile"
exec open "$destfile"
# imgcat < "$destfile" # i wish this worked but nah. some weird thing where iterm doesnt show it forreal and instaed prints the base64. cant find a bug
fi
fi
fi
Loading

0 comments on commit 2291ff1

Please sign in to comment.