From 8080f0d48a23f9e450741cfd64d94694b37e2d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Thu, 28 Dec 2017 20:10:17 +0000 Subject: 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 --- tools/git-migration/filter-sec-tracker-data | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 tools/git-migration/filter-sec-tracker-data (limited to 'tools/git-migration/filter-sec-tracker-data') 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}" -- cgit v1.2.3