Skip to content

Commit 5651f62

Browse files
committed
Merge branch 'rh/lint-history-refs-option'
Signed-off-by: Elijah Newren <[email protected]>
2 parents f955eb7 + 3e15380 commit 5651f62

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contrib/filter-repo-demos/lint-history

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ parser.add_argument('--filenames-important', action='store_true',
9595
"random name. If the linting program needs to know the file "
9696
"basename to operate correctly (e.g. because it needs to know "
9797
"the file's extension), then pass this argument"))
98+
parser.add_argument('--refs', nargs='+',
99+
help=("Limit history rewriting to the specified refs. "
100+
"Implies --partial of git-filter-repo (and all its "
101+
"implications)."))
98102
parser.add_argument('command', nargs=argparse.REMAINDER,
99103
help=("Lint command to run, other than the filename at the end"))
100104
lint_args = parser.parse_args()
@@ -158,6 +162,7 @@ if lint_args.relevant:
158162
lint_args.filenames_important = True
159163
args = fr.FilteringOptions.default_options()
160164
args.force = True
165+
args.refs = lint_args.refs if lint_args.refs is not None else []
161166
if lint_args.filenames_important:
162167
tmpdir = tempfile.mkdtemp().encode()
163168
cat_file_process = subprocess.Popen(['git', 'cat-file', '--batch'],

0 commit comments

Comments
 (0)