8 tmp=.git/dgit-badcommit-fixup-tmp
12 LC_MESSAGES=C git fsck --no-dangling >$tmp/gfo 2>&1 || test $? = 1
15 print $1, "\n" or die $! if
16 m/^error in commit (\w+):.*invalid format - expected '\''committer/;
19 case `wc -l <$tmp/bad` in
21 echo >&2 'nothing bad found - is git-fsck doing as we expect?' ;
25 nots="^$bads^0 ^$bads^1"
34 refs=`git-for-each-ref --format='%(refname)'`
36 if git-symbolic-ref HEAD >/dev/null 2>&1; then
44 if git merge-base --is-ancestor $bad $head; then
49 if ! $needed; then continue; fi
53 git filter-branch --original dgit-badcommit --commit-filter '
58 sed -e '\''1,/^$/ s/^commiter /committer /'\''