about summary refs log tree commit diff stats
path: root/subx/ggdiff
blob: e2263ec2c2c4341af9005ea969cfd74fc857bccd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env zsh
# git diff a specific example's generated binary after converting through xxd.

if [ $# -eq 0 ]
then
  echo "ggdiff <target> [rev]"
  exit 1
fi

target=$1
rev=${2:-HEAD}

tmp=`mktemp`

if [[ $target == 'test'* ]]
then
  git show ${rev}:subx/teensy/$target > $tmp
  xdiff $tmp teensy/$target
else
  git show ${rev}:subx/$target > $tmp
  xdiff $tmp $target
fi