mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-07-06 02:12:17 +02:00
filter-repo: make git version requirement error message more direct
Users won't know which versions of git have --mark-tags, --reencode, or --combined-all-paths options for fast-export and diff-tree. I didn't either when I wrote those messages because it wasn't in a released version of git. Now that they are in released versions and have been for a while, we can simplify the messages to just state which git version is needed. Signed-off-by: Elijah Newren <newren@gmail.com>
This commit is contained in:
parent
1e2d0e91cb
commit
15494bba8a
@ -2045,12 +2045,12 @@ EXAMPLES
|
|||||||
global write_marks
|
global write_marks
|
||||||
write_marks = False
|
write_marks = False
|
||||||
if args.state_branch:
|
if args.state_branch:
|
||||||
raise SystemExit(_("Error: need a version of git whose fast-export "
|
# We need a version of git-fast-export with --mark-tags
|
||||||
"command has the --mark-tags option"))
|
raise SystemExit(_("Error: need git >= 2.24.0"))
|
||||||
if b'--reencode' not in output: # pragma: no cover
|
if b'--reencode' not in output: # pragma: no cover
|
||||||
if args.preserve_commit_encoding:
|
if args.preserve_commit_encoding:
|
||||||
raise SystemExit(_("Error: need a version of git whose fast-export "
|
# We need a version of git-fast-export with --reencode
|
||||||
"command has the --reencode option"))
|
raise SystemExit(_("Error: need git >= 2.23.0"))
|
||||||
else:
|
else:
|
||||||
# Set args.preserve_commit_encoding to None which we'll check for later
|
# Set args.preserve_commit_encoding to None which we'll check for later
|
||||||
# to avoid passing --reencode=yes to fast-export (that option was the
|
# to avoid passing --reencode=yes to fast-export (that option was the
|
||||||
@ -2063,8 +2063,8 @@ EXAMPLES
|
|||||||
p.wait()
|
p.wait()
|
||||||
output = p.stdout.read()
|
output = p.stdout.read()
|
||||||
if b'--combined-all-paths' not in output:
|
if b'--combined-all-paths' not in output:
|
||||||
raise SystemExit(_("Error: need a version of git whose diff-tree "
|
# We need a version of git-diff-tree with --combined-all-paths
|
||||||
"command has the --combined-all-paths option"))
|
raise SystemExit(_("Error: need git >= 2.22.0"))
|
||||||
# End of sanity checks on git version
|
# End of sanity checks on git version
|
||||||
if args.max_blob_size:
|
if args.max_blob_size:
|
||||||
suffix = args.max_blob_size[-1]
|
suffix = args.max_blob_size[-1]
|
||||||
|
Loading…
Reference in New Issue
Block a user