#!/usr/bin/bash function dshow { git show $1 | eat-diff-numbers } function comp { local b="/tmp/[b-$3]-$(git log --format=%f -n 1 $2).patch" dshow $2 > $b dshow $(git-find-subj $1 $2 || echo "NOT FOUND") > /tmp/a.patch if ! diff /tmp/a.patch $b > /dev/null ; then co=$(git log --format=%s -n 1 $c) echo -n $co - differs | tee -a loglog echo "/tmp/a.patch - found in $1: " echo "$b - $c from current branch" echo "type exit to continue" #git diff --no-index --color-words --word-diff-regex=. /tmp/{a,b}.patch if vimdiff < /dev/tty -c 0 /tmp/a.patch $b ; then echo " - ok" | tee -a loglog else echo " - bad" | tee -a loglog fi return 1 fi } rm loglog logcur a=0 git log $2 --format="%h" --reverse | while read c; do ((a++)) co=$(git log --format=%s -n 1 $c) git log -n 1 $c > logcur if comp $1 $c $a; then echo $co - ok | tee -a loglog fi done