mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-07-03 17:05:39 +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
|
||||
write_marks = False
|
||||
if args.state_branch:
|
||||
raise SystemExit(_("Error: need a version of git whose fast-export "
|
||||
"command has the --mark-tags option"))
|
||||
# We need a version of git-fast-export with --mark-tags
|
||||
raise SystemExit(_("Error: need git >= 2.24.0"))
|
||||
if b'--reencode' not in output: # pragma: no cover
|
||||
if args.preserve_commit_encoding:
|
||||
raise SystemExit(_("Error: need a version of git whose fast-export "
|
||||
"command has the --reencode option"))
|
||||
# We need a version of git-fast-export with --reencode
|
||||
raise SystemExit(_("Error: need git >= 2.23.0"))
|
||||
else:
|
||||
# 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
|
||||
|
@ -2063,8 +2063,8 @@ EXAMPLES
|
|||
p.wait()
|
||||
output = p.stdout.read()
|
||||
if b'--combined-all-paths' not in output:
|
||||
raise SystemExit(_("Error: need a version of git whose diff-tree "
|
||||
"command has the --combined-all-paths option"))
|
||||
# We need a version of git-diff-tree with --combined-all-paths
|
||||
raise SystemExit(_("Error: need git >= 2.22.0"))
|
||||
# End of sanity checks on git version
|
||||
if args.max_blob_size:
|
||||
suffix = args.max_blob_size[-1]
|
||||
|
|
Loading…
Reference in New Issue
Block a user