6 tmp=.git/dgit-badcommit-fixup-tmp
10 LC_MESSAGES=C git fsck --no-dangling >$tmp/gfo 2>&1 || test $? = 1
13 print $1, "\n" or die $! if
14 m/^error in commit (\w+):.*invalid format - expected '\''committer/;
17 case `wc -l <$tmp/bad` in
19 echo >&2 'nothing bad found - is git-fsck doing as we expect?' ;
23 nots="^$bads^0 ^$bads^1"
32 for head in HEAD `git-for-each-ref --format='%(refname)'`; do
36 if git merge-base --is-ancestor $bad $head; then
41 if ! $needed; then continue; fi
50 s/^(\w+.*\n)*commiter /$1committer /;
53 git filter-branch --original dgit-badcommit --commit-filter '
54 sed -e '\''1,/^$/ s/^commiter /committer /'\''