X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=blobdiff_plain;f=convert;h=91f62d284a991381f73de15d34cb11707f484d75;hp=7541ff12c258bc65ce3c53e71115103a09e4bd23;hb=4631609f16aa83929a17af7937c17f62eb8a1157;hpb=95360dba667df074a6d5ca632fb4ec4ec551e40d diff --git a/convert b/convert index 7541ff1..91f62d2 100755 --- a/convert +++ b/convert @@ -73,17 +73,22 @@ tochiark-1998-11-17 fromchiark-1998-11-28 END -git checkout master -scr=cvs-to-git-conversion-script -cp $base/script/convert $scr -git add $scr -git commit -m "$scr: record the script +(set -e + cd $base/script + if [ x"`git diff`" != x ]; then + git checkout master~0 + git commit -a -m autocommit + git tag -f actual + git reset master + git checkout master + fi) -Record the script we used to convert the CVS repo to git" -git rm $scr -git commit -m "$scr: delete the script +git checkout master +git fetch $base/script actual +git merge -m 'CVS to git conversion -We have in fact done the conversion and don't need the script any more." +Record the scripts etc. we used (and their history) for posterity, +by binding them into the history.' FETCH_HEAD git branch -d origin git tag cvs-to-git-conversion @@ -92,6 +97,16 @@ cat >$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/^\+(?!u?adns).*\w.*$/m || $out =~ m/^\-(?!u?adns).*\w.*$/m)) {