X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=blobdiff_plain;f=convert;h=a0f4e8fa674d21c486c12682a04ed0d4ef75a0f6;hp=07f7e4428f0ae4a6df18a61529c4c0eb4138c451;hb=6e1863b4fcaa8668d5fca80e1cfa176c8ed4d62f;hpb=067bc0cfd2ed0f8a0e51cee116604a38520bc41b diff --git a/convert b/convert index 07f7e44..a0f4e8f 100755 --- a/convert +++ b/convert @@ -43,7 +43,7 @@ graftmergein () { local branchname=branch-$desc mkdir -p .git/info local branchtip=`git rev-parse $branchname~0` - local oldparents=`git-log -n1 --pretty=format:%P $mergecommit` + local oldparents=`git log -n1 --pretty=format:%P $mergecommit` cat <>.git/info/grafts $2 $oldparents $branchtip END @@ -61,7 +61,7 @@ abandonbranch branch-0-7-inftodebug abandon.2000-03-26.infotodebug-0.7 graftmergein logcallbackfn 741a795cdaa539b48f83afbc0ac8e471543b9bf6 graftmergein 1999-05-09-gplvslgpl e7cf3a99e5829bf53a9f36e08769787a78261045 -graftmergein 1999-04-11 pollfds f889c99835eec14dacda4b18da0636911dcd8cbc +graftmergein 1999-04-11-pollfds f889c99835eec14dacda4b18da0636911dcd8cbc xargs git tag -d <$tmp/msg-filter <<'FEND' perl -ne ' $out .= $_; END { + if ($out =~ /\*\*\* empty log message/) { + ($out = `git diff $ENV{GIT_COMMIT}^ $ENV{GIT_COMMIT} -- changelog`) + =~ s/\A.*\n\@\@ /\@\@ /s; + } + if ($out !~ /\n.*\n/) { + $out = `fmt <<'\''EOF'\'' +$out +EOF +`; + } if ($out =~ m/^\@\@/s && - $out =~ m/^(?:\+ )?[^\@ ].*\w.*$/m) { + ($out =~ m/^\+(?!u?adns).*\w.*$/m || + $out =~ m/^\-(?!u?adns).*\w.*$/m)) { print $&, "\n\n" or die $!; } print $out or die $!; @@ -102,11 +120,11 @@ perl -ne ' FEND chmod +x $tmp/msg-filter -git-filter-branch --msg-filter $tmp/msg-filter \ - `git-show-ref | awk '{print $2}'` +git filter-branch --msg-filter $tmp/msg-filter \ + `git show-ref | awk '{print $2}'` -git-show-ref | awk '{print $2}' | grep '^refs/original/' \ - | xargs -n1 git-update-ref -d +git show-ref | awk '{print $2}' | grep '^refs/original/' \ + | xargs -n1 git update-ref -d rm -rf $tmp/converted mkdir $tmp/converted