Skip to content

Commit 89c5230

Browse files
committed
filter-repo: --sensitive-data-removal requires git >= 2.36.0
Also, although people using other features can get away with older git versions, we may as well advertise 2.36 as the minimum version; it's nearly three years old. Signed-off-by: Elijah Newren <newren@gmail.com>
1 parent 3528c65 commit 89c5230

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ history rewriting tools](contrib/filter-repo-demos).
3838

3939
filter-repo requires:
4040

41-
* git >= 2.22.0 at a minimum; [some features](#upstream-improvements)
42-
require git >= 2.24.0 or later
41+
* git >= 2.36.0
4342
* python3 >= 3.6
4443

4544
# How do I install it?

git-filter-repo

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2307,6 +2307,12 @@ EXAMPLES
23072307
if b'--combined-all-paths' not in output:
23082308
# We need a version of git-diff-tree with --combined-all-paths
23092309
raise SystemExit(_("Error: need git >= 2.22.0"))
2310+
if args.sensitive_data_removal:
2311+
p = subproc.Popen('git cat-file -h'.split(),
2312+
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
2313+
output = p.stdout.read()
2314+
if b"--batch-command" not in output: # pragma: no cover
2315+
raise SystemExit(_("Error: need git >= 2.36.0"))
23102316
# End of sanity checks on git version
23112317
if args.max_blob_size:
23122318
suffix = args.max_blob_size[-1]

0 commit comments

Comments
 (0)