Fix "Passed but got" error on CJK file names
filter-repo callback passes unicode filename as utf_8 bytes but `git check-ignore` prints unicode filename as quoted octal escaped utf_8 bytes failing the `name != pathname` check on CJK filenames `.decode('unicode_escape')` decodes latin-1 bytes with escaped unicode so it decodes the escaped bytes, but into a latin-1 str, therefore `.encode('latin_1')` recovers the original bytes, which is utf_8 and is comparable to the filename passed by filter-repo callback Signed-off-by: Yufan Lou <2263580+louy2@users.noreply.github.com>pull/438/head
parent
e7e245242b
commit
e1596776c9
Loading…
Reference in New Issue