File: barebones-example

package info (click to toggle)
git-filter-repo 2.47.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,280 kB
  • sloc: sh: 4,887; python: 4,856; makefile: 114
file content (28 lines) | stat: -rwxr-xr-x 801 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python3

"""
This is a simple program that behaves identically to git-filter-repo.  Its
entire purpose is just to show what to import and run to get the normal
git-filter-repo behavior, to serve as a starting point for you to figure
out what you want to modify.
"""

"""
Please see the
  ***** API BACKWARD COMPATIBILITY CAVEAT *****
near the top of git-filter-repo.
"""

import sys

try:
  import git_filter_repo as fr
except ImportError:
  raise SystemExit("Error: Couldn't find git_filter_repo.py.  Did you forget to make a symlink to git-filter-repo named git_filter_repo.py or did you forget to put the latter in your PYTHONPATH?")

args = fr.FilteringOptions.parse_args(sys.argv[1:])
if args.analyze:
  fr.RepoAnalyze.run(args)
else:
  filter = fr.RepoFilter(args)
  filter.run()