filter-repo: improve invalid repository error message

Even though the repository is encoded as a bytestring, we want error
messages to be UTF-8.

Signed-off-by: Elijah Newren <newren@gmail.com>
pull/241/head
Elijah Newren 3 years ago
parent 7500fb7c5a
commit cf67ccd978

@ -1504,7 +1504,7 @@ class GitUtils(object):
count = int(p2.communicate()[0])
if p1.poll() != 0:
raise SystemExit(_("%s does not appear to be a valid git repository")
% repo)
% decode(repo))
return count
@staticmethod

@ -160,7 +160,7 @@ test_expect_success 'other error cases' '
cd other &&
! python3 -c "import git_filter_repo as fr; fr.GitUtils.get_commit_count(b\".\", [\"HEAD\"])" 2>err &&
test_i18ngrep ". does not appear to be a valid git repository" err
test_i18ngrep "\. does not appear to be a valid git repository" err
)
'

Loading…
Cancel
Save