diff options
Diffstat (limited to 'subx/ggdiff')
-rwxr-xr-x | subx/ggdiff | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/subx/ggdiff b/subx/ggdiff new file mode 100755 index 00000000..e2263ec2 --- /dev/null +++ b/subx/ggdiff @@ -0,0 +1,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 |