diff options
author | Nicolas Chauvet <kwizart@gmail.com> | 2014-07-01 11:19:48 -0600 |
---|---|---|
committer | Ken Dreyer <ktdreyer@ktdreyer.com> | 2014-07-01 11:20:49 -0600 |
commit | ee806c8dfd23b1d22f374d58873423cd4c40f2b0 (patch) | |
tree | 65751f782757f00e407ed7a9def0c35cd69c8868 | |
parent | c5b1eb2208019135b7e777d1f85bfe880b36b842 (diff) | |
download | rpmfusion-tools-ee806c8dfd23b1d22f374d58873423cd4c40f2b0.tar.gz rpmfusion-tools-ee806c8dfd23b1d22f374d58873423cd4c40f2b0.tar.xz rpmfusion-tools-ee806c8dfd23b1d22f374d58873423cd4c40f2b0.zip |
cleanup CVS files during git filter-branch
Remove the branch, Makefile, and .cvsignore files during the git
filter-branch operation.
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
-rwxr-xr-x | cvstogit | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -125,9 +125,13 @@ convert_branches() { fi # Switch to our new branch. git checkout $gitbranch + # Remove Makefile and branch along with moving .cvsignore to .gitignore # Rewrite this branch, isolating the changes from this one # directory in CVS. - git filter-branch --tag-name-filter cat --prune-empty --subdirectory-filter $cvsbranch HEAD + git filter-branch \ + --tag-name-filter cat --prune-empty --subdirectory-filter $cvsbranch \ + --tree-filter 'rm -f branch Makefile ; if [ -f .cvsignore ] ; then git mv .cvsignore .gitignore ; fi' \ + HEAD # Cleanup after filter-branch. git reset --hard git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d @@ -136,16 +140,6 @@ convert_branches() { git reflog expire --expire=now --all git gc --aggressive --prune=now - # Additional conversion: - # FIXME: Some branches appear to be missing these files? - if [[ ! -f "Makefile" ]]; then - echo "no Makefile found in branch ${gitbranch}" - fi - rm Makefile - rm branch - mv .cvsignore .gitignore - git add .gitignore - git commit -a -m "dist-git conversion" --author="$AUTHOR" git checkout origin done popd |