diff --git a/git-filter-repo b/git-filter-repo index 8039fdd..5420acd 100755 --- a/git-filter-repo +++ b/git-filter-repo @@ -115,6 +115,10 @@ def date_to_string(dateobj): return('{} {}'.format(int(_timedelta_to_seconds(dateobj - epoch)), dateobj.tzinfo.tzname(0))) +def decode(bytestr): + 'Try to convert bytestr to utf-8 for outputting as an error message.' + return bytestr.decode('utf-8', 'backslashreplace') + class PathQuoting: _unescape = {'a': '\a', 'b': '\b',