newren / git-filter-repo

Quickly rewrite git repository history (filter-branch replacement)
Other
8.55k stars 708 forks source link

lint-history: --refs argument not working at all #552

Closed niziak closed 4 months ago

niziak commented 7 months ago

Hello.

Please look at change: https://github.com/newren/git-filter-repo/blob/4bc9022afce5e2e138596bbecf4df310212ae164/contrib/filter-repo-demos/lint-history#L165

and check if it should be corrected like this:

diff --git a/lint-history-org b/lint-history
index 61967b7..5ec33ad 100755
--- a/lint-history-org
+++ b/lint-history
@@ -162,7 +162,7 @@ if lint_args.relevant:
   lint_args.filenames_important = True
 input_args = []
 if lint_args.refs:
-  input_args = ["--args",] + lint_args.refs
+  input_args = ["--refs",] + lint_args.refs
 args = fr.FilteringOptions.parse_args(input_args, error_on_empty = False)
 args.force = True
 if lint_args.filenames_important:
newren commented 4 months ago

Well, that's embarrassing. Fixed with commit 48a7dcf7db73 (lint-history: fix broken --refs option, again, 2024-07-02), and added a regression test to make sure the --refs option continues to work.

Thanks for reporting!