Skip to content

Commit cf67ccd

Browse files
committed
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 <[email protected]>
1 parent 7500fb7 commit cf67ccd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

git-filter-repo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,7 @@ class GitUtils(object):
15041504
count = int(p2.communicate()[0])
15051505
if p1.poll() != 0:
15061506
raise SystemExit(_("%s does not appear to be a valid git repository")
1507-
% repo)
1507+
% decode(repo))
15081508
return count
15091509

15101510
@staticmethod

t/t9391-filter-repo-lib-usage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ test_expect_success 'other error cases' '
160160
cd other &&
161161
162162
! python3 -c "import git_filter_repo as fr; fr.GitUtils.get_commit_count(b\".\", [\"HEAD\"])" 2>err &&
163-
test_i18ngrep ". does not appear to be a valid git repository" err
163+
test_i18ngrep "\. does not appear to be a valid git repository" err
164164
)
165165
'
166166

0 commit comments

Comments
 (0)