Add filtering script
This commit is contained in:
parent
25e159d96b
commit
a1f8720e74
9
filter.sh
Executable file
9
filter.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
set -euo pipefail
|
||||
export FILTER_BRANCH_SQUELCH_WARNING=1
|
||||
git branch -D filtered
|
||||
git switch -c filtered
|
||||
git filter-branch -f --tree-filter "rm -f $(rg --files-without-match 'SPDX-License-Identifier: (L)?GPL-3.0-or-later' -g '/u??/**/*' | tr '\n' ' ')" HEAD
|
||||
git push -f -u filtered filtered
|
||||
git switch -
|
Reference in a new issue