Comment 2 for bug 1180552

Revision history for this message
James E. Blair (corvus) wrote :

Here's a git repo made by filtering the openstack-ops related files out of openstack-manuals (and some others I thought were handy):

  https://github.com/jeblair/openstack-ops

Let me know if you would like any changes to that. For reference, here are the commands I used:

cat > /tmp/t.sh <<EOF
#!/bin/bash
find . -type f -not -regex './.git/.*' -not -regex './doc/src/docbkx/openstack-ops/.*' -not -wholename ./.gitignore -not -wholename ./LICENSE -not -wholename ./tools/generatedocbook -not -wholename ./tools/generatepot -not -wholename ./tools/validate.py |xargs --delimiter="\n" git rm -q -f
exit 0
EOF

git clone file:///tmp/openstack-manuals /tmpfs/openstack-ops
cd /tmpfs/openstack-ops
git remote rm origin
time git filter-branch --tree-filter "/tmp/t.sh" --prune-empty HEAD
git reset --hard
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d
git tag -l | xargs git tag -d
# Find the commit that should be the new initial commit
git filter-branch -f --parent-filter 'test $GIT_COMMIT = 69c118f2cf90cd2a1e4e306f3ff6cbba0bf0ab0d && echo "" || cat' HEAD
git rebase --committer-date-is-author-date $(git log --format='format:%H' | tail -1)
git filter-branch -f --commit-filter 'GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" git commit-tree "$@"' HEAD
git reset --hard
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d
git reflog expire --expire=now --all
git gc --aggressive --prune=now