Skip to content

Commit cf84943

Browse files
committed
Merge branch 'lk/path-rename-colon-count'
Signed-off-by: Elijah Newren <[email protected]>
2 parents 4987e0f + 28b479b commit cf84943

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git-filter-repo

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,10 @@ class FilteringOptions(object):
16221622
if suffix.startswith('rename'):
16231623
mod_type = 'rename'
16241624
match_type = option_string[len('--path-rename-'):] or 'match'
1625-
values = values.split(b':', 1)
1625+
values = values.split(b':')
1626+
if len(values) != 2:
1627+
raise SystemExit(_("Error: --path-rename expects one colon in its"
1628+
" argument: <old_name:new_name>."))
16261629
if values[0] and values[1] and not (
16271630
values[0].endswith(b'/') == values[1].endswith(b'/')):
16281631
raise SystemExit(_("Error: With --path-rename, if OLD_NAME and "

0 commit comments

Comments
 (0)