Thread (5 messages) flat view 5 messages, 3 authors, 2016-06-15

Re: [RFC/PATCH 2/8 v2] git_remote_helpers: fix input when running under Python 3

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:55:46

Possibly related (same subject, not in this thread)

John Keeping [off-list ref] writes:
quoted
That really feels wrong.  Displaying is a separate issue and it is
the _right_ thing to punt the problem at the lower-level machinery
level.
But the display will require decoding the ref name to a Unicode string,
which depends on the encoding of the underlying ref name, so it feels
like it should be decoded where it's read (see [1]).
If you botch the decoding in a way you cannot recover the original
byte string, you cannot create a ref whose name is the original byte
string, no?  Keeping the original byte string internally (this
includes where you use it to create new refs or update existing
refs), and attempting to convert it to Unicode when you choose to
show that string as a part of a message to the user (and falling
back to replacing some bytes to '?' if you cannot, but do so only in
the message), you won't have that problem.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help