Skip to content

Commit f955eb7

Browse files
committed
Merge branch 'fm/clean-ignore-arg-passthru'
Signed-off-by: Elijah Newren <[email protected]>
2 parents f57759d + 4896736 commit f955eb7

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

contrib/filter-repo-demos/clean-ignore

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ near the top of git-filter-repo.
1818
import argparse
1919
import os
2020
import subprocess
21+
import sys
2122
try:
2223
import git_filter_repo as fr
2324
except ImportError:
@@ -65,7 +66,14 @@ class CheckIgnores:
6566
commit.file_changes = [x for x in commit.file_changes
6667
if x.filename not in bad]
6768

68-
checker = CheckIgnores()
69-
args = fr.FilteringOptions.default_options()
70-
filter = fr.RepoFilter(args, commit_callback=checker.skip_ignores)
71-
filter.run()
69+
70+
def main():
71+
checker = CheckIgnores()
72+
args = fr.FilteringOptions.parse_args(sys.argv[1:])
73+
filter = fr.RepoFilter(args, commit_callback=checker.skip_ignores)
74+
filter.run()
75+
76+
77+
if __name__ == '__main__':
78+
main()
79+

0 commit comments

Comments
 (0)