{"thread":{"id":"40392","subject":"[PATCH v3] git-p4: use replacement character for non UTF-8 characters in paths","startedAt":"2015-09-21T08:49:17Z","lastAt":"2015-09-21T20:23:13Z","messageCount":4,"participants":["larsxschneider@gmail.com","Luke Diamand","Junio C Hamano"],"isPatch":true,"patchVersion":3,"patchTotal":null},"messages":[{"id":"270382","messageId":"1442825358-90294-1-git-send-email-larsxschneider@gmail.com","threadId":"40392","inReplyTo":null,"subject":"[PATCH v3] git-p4: use replacement character for non UTF-8 characters in paths","fromName":"","fromEmail":"larsxschneider@gmail.com","sentAt":"2015-09-21T08:49:17Z","receivedAt":"2015-09-21T08:49:17Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"From: Lars Schneider <larsxschneider@gmail.com>\n\nI broke a test in \"[PATCH v2] git-p4: improve path encoding verbose output\" on the next branch.\nThis patch on top of next (3dd15c0) fixes the issue.\n\nThanks to Luke for finding the issue!\n\nCheers,\nLars\n\nLars Schneider (1):\n  git-p4: use replacement character for non UTF-8 characters in paths\n\n git-p4.py | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\n--\n2.5.1\n"},{"id":"270383","messageId":"1442825358-90294-2-git-send-email-larsxschneider@gmail.com","threadId":"40392","inReplyTo":"1442825358-90294-1-git-send-email-larsxschneider@gmail.com","subject":"[PATCH v3] git-p4: use replacement character for non UTF-8 characters in paths","fromName":"","fromEmail":"larsxschneider@gmail.com","sentAt":"2015-09-21T08:49:18Z","receivedAt":"2015-09-21T08:49:18Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"From: Lars Schneider <larsxschneider@gmail.com>\n\nIf non UTF-8 characters are detected in paths then replace them with �\ninstead of throwing a UnicodeDecodeError exception. This restores the\noriginal (implicit) implementation that was broken in 00a9403.\n\nSigned-off-by: Lars Schneider <larsxschneider@gmail.com>\n---\n git-p4.py | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-p4.py b/git-p4.py\nindex e7510a9..215f556 100755\n--- a/git-p4.py\n+++ b/git-p4.py\n@@ -2226,7 +2226,7 @@ class P4Sync(Command, P4UserMap):\n             encoding = 'utf8'\n             if gitConfig('git-p4.pathEncoding'):\n                 encoding = gitConfig('git-p4.pathEncoding')\n-            relPath = relPath.decode(encoding).encode('utf8', 'replace')\n+            relPath = relPath.decode(encoding, 'replace').encode('utf8', 'replace')\n             if self.verbose:\n                 print 'Path with non-ASCII characters detected. Used %s to encode: %s ' % (encoding, relPath)\n \n-- \n2.5.1\n"},{"id":"270418","messageId":"56005BDD.6050508@diamand.org","threadId":"40392","inReplyTo":"1442825358-90294-1-git-send-email-larsxschneider@gmail.com","subject":"Re: [PATCH v3] git-p4: use replacement character for non UTF-8 characters in paths","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2015-09-21T19:34:53Z","receivedAt":"2015-09-21T19:34:53Z","isPatch":true,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On 21/09/15 09:49, larsxschneider@gmail.com wrote:\n> From: Lars Schneider <larsxschneider@gmail.com>\n>\n> I broke a test in \"[PATCH v2] git-p4: improve path encoding verbose output\" on the next branch.\n> This patch on top of next (3dd15c0) fixes the issue.\n>\n> Thanks to Luke for finding the issue!\n\nLooks good to me, apart from using a UTF-8 char in the comment itself, \nwhich seems a bit unnecessary. Imagine what will happen to someone using \ngit-p4 to mirror git-p4 itself into p4!\n\n\n>\n> Cheers,\n> Lars\n>\n> Lars Schneider (1):\n>    git-p4: use replacement character for non UTF-8 characters in paths\n>\n>   git-p4.py | 2 +-\n>   1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> --\n> 2.5.1\n>\n"},{"id":"270423","messageId":"xmqqwpvj8qtq.fsf@gitster.mtv.corp.google.com","threadId":"40392","inReplyTo":"56005BDD.6050508@diamand.org","subject":"Re: [PATCH v3] git-p4: use replacement character for non UTF-8 characters in paths","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-09-21T20:23:13Z","receivedAt":"2015-09-21T20:23:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Luke Diamand <luke@diamand.org> writes:\n\n> On 21/09/15 09:49, larsxschneider@gmail.com wrote:\n>> From: Lars Schneider <larsxschneider@gmail.com>\n>>\n>> I broke a test in \"[PATCH v2] git-p4: improve path encoding verbose\n>> output\" on the next branch.\n>> This patch on top of next (3dd15c0) fixes the issue.\n>>\n>> Thanks to Luke for finding the issue!\n>\n> Looks good to me, apart from using a UTF-8 char in the comment itself,\n> which seems a bit unnecessary. Imagine what will happen to someone\n> using git-p4 to mirror git-p4 itself into p4!\n\n;-)  Thanks.\n\n>\n>\n>>\n>> Cheers,\n>> Lars\n>>\n>> Lars Schneider (1):\n>>    git-p4: use replacement character for non UTF-8 characters in paths\n>>\n>>   git-p4.py | 2 +-\n>>   1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> --\n>> 2.5.1\n>>\n"}]}