mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-07-06 18:32:14 +02:00
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>
This commit is contained in:
parent
7500fb7c5a
commit
cf67ccd978
@ -1504,7 +1504,7 @@ class GitUtils(object):
|
|||||||
count = int(p2.communicate()[0])
|
count = int(p2.communicate()[0])
|
||||||
if p1.poll() != 0:
|
if p1.poll() != 0:
|
||||||
raise SystemExit(_("%s does not appear to be a valid git repository")
|
raise SystemExit(_("%s does not appear to be a valid git repository")
|
||||||
% repo)
|
% decode(repo))
|
||||||
return count
|
return count
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -160,7 +160,7 @@ test_expect_success 'other error cases' '
|
|||||||
cd other &&
|
cd other &&
|
||||||
|
|
||||||
! python3 -c "import git_filter_repo as fr; fr.GitUtils.get_commit_count(b\".\", [\"HEAD\"])" 2>err &&
|
! 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…
Reference in New Issue
Block a user