diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-12-28 20:10:17 +0000 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-12-28 20:10:17 +0000 |
commit | 7dea55856ba8827839bb76fa0af8a50a2c39d617 (patch) | |
tree | 532c8ae08b5f68a8aae6a1f25b889d138c8d0718 /tools/git-migration/filter-sec-tracker-data | |
parent | af01be99fe51a77c791e9b9aebeb251d3ba1db5d (diff) |
Add scripts to split security-tracker into data and "binaries"
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@59003 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'tools/git-migration/filter-sec-tracker-data')
-rwxr-xr-x | tools/git-migration/filter-sec-tracker-data | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/git-migration/filter-sec-tracker-data b/tools/git-migration/filter-sec-tracker-data new file mode 100755 index 0000000000..e834d4e3a9 --- /dev/null +++ b/tools/git-migration/filter-sec-tracker-data @@ -0,0 +1,26 @@ +#!/bin/bash +# +# Separate security tracker data form the "binaries" +# +# With no option the data repo will be built, with +# "--binary" the binary repo will be built +# +# This will be run only once when migrating from svn to git + +FILTER='^(conf|data|doc|org|packages|stamps)/|^TODO.gitmigration|^Makefile|^.gitignore' +BRANCH=master + +OUT=v +if [ "$1" == "--binary" ]; then + OUT= +fi + +git filter-branch \ + --prune-empty \ + --index-filter " + git ls-tree -z -r --name-only --full-tree \$GIT_COMMIT \ + | grep -zZE'${OUT}' '"${FILTER}"' \ + | xargs -0 -r git rm --cached -r + " \ + -- \ +"${BRANCH}" |