From: lode leroy Date: Thu, 30 Jun 2005 12:20:45 GMT Subject: how about this as a basis for git-annotate? Message-ID: #!/bin/bash file="$1" anno="$file.anno" prev="" export GIT_DIFF_OPTS=-u0 rm $anno touch $anno revs=`git-rev-list HEAD | tac` for rev in $revs; do if [ ! -z "$prev" ]; then git-diff-tree -p $prev $rev $file \ | sed -e "/^--- /p" \ -e "/^+++ /p" \ -e "/^--- /d" \ -e "/^+++ /d" \ -e "s/^-/-$prev /g" \ -e "s/^+/+$rev /g" | patch $anno fi prev=$rev done * gives a warning when the diff is empty * has a problem with "\ No newline at end of file"