{"thread":{"id":"14498","subject":"gitk: Author/Committer name with special characters","startedAt":"2008-07-16T22:24:37Z","lastAt":"2008-07-19T15:16:04Z","messageCount":4,"participants":["Torsten Paul","Paul Mackerras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"83607","messageId":"487E7525.7000708@gmx.de","threadId":"14498","inReplyTo":null,"subject":"gitk: Author/Committer name with special characters","fromName":"Torsten Paul","fromEmail":"torsten.paul@gmx.de","sentAt":"2008-07-16T22:24:37Z","receivedAt":"2008-07-16T22:24:37Z","isPatch":false,"sender":{"key":"torsten.paul@gmx.de","avatar":null},"body":"Hi!\n\nI'm tracking a subversion repository which is running on\na windows machine with git-svn. The user names look like\nDOMAIN\\username and that's giving a strange display in\ngitk as the backslash sequence is evaluated.\n\nI'm not sure if I found the correct place to prevent this,\nso I'd like to ask if the following change would be the\ncorrect thing to prepare as patch...\n\nciao,\n   Torsten.\n\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex fddcb45..f114fa2 100644\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -1510,10 +1510,10 @@ proc parsecommit {id contents listed} {\n         set tag [lindex $line 0]\n         if {$tag == \"author\"} {\n             set audate [lindex $line end-1]\n-           set auname [lrange $line 1 end-2]\n+           set auname [join [lrange [split $line] 1 end-2]]\n         } elseif {$tag == \"committer\"} {\n             set comdate [lindex $line end-1]\n-           set comname [lrange $line 1 end-2]\n+           set comname [join [lrange [split $line] 1 end-2]]\n         }\n      }\n      set headline {}\n"},{"id":"83633","messageId":"18558.35423.933860.915622@cargo.ozlabs.ibm.com","threadId":"14498","inReplyTo":"487E7525.7000708@gmx.de","subject":"Re: gitk: Author/Committer name with special characters","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2008-07-16T23:55:11Z","receivedAt":"2008-07-16T23:55:11Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Torsten Paul writes:\n\n> I'm tracking a subversion repository which is running on\n> a windows machine with git-svn. The user names look like\n> DOMAIN\\username and that's giving a strange display in\n> gitk as the backslash sequence is evaluated.\n> \n> I'm not sure if I found the correct place to prevent this,\n> so I'd like to ask if the following change would be the\n> correct thing to prepare as patch...\n\nSomething like that, I think, but to be sure I'd like to see the\nactual author and committer lines that are causing the problem.  Could\nyou send me the output of \"git cat-file commit\" on one of the\nproblematic commits?\n\nThanks,\nPaul.\n"},{"id":"83648","messageId":"487EF619.3000805@gmx.de","threadId":"14498","inReplyTo":"18558.35423.933860.915622@cargo.ozlabs.ibm.com","subject":"Re: gitk: Author/Committer name with special characters","fromName":"Torsten Paul","fromEmail":"torsten.paul@gmx.de","sentAt":"2008-07-17T07:34:49Z","receivedAt":"2008-07-17T07:34:49Z","isPatch":false,"sender":{"key":"torsten.paul@gmx.de","avatar":null},"body":"Paul Mackerras wrote:\n > Something like that, I think, but to be sure I'd like to see the\n > actual author and committer lines that are causing the problem.  Could\n > you send me the output of \"git cat-file commit\" on one of the\n > problematic commits?\n >\nThe header of the commits look like this:\n\ntree 2eaf317290917660c03dc977d5eae180b39420e0\nparent e99bf1c38540300c501dbe776de28eed6a2250cd\nauthor DOM\\paul <DOM\\paul@28e39a90-19ad-e645-8baa-5c9ab2323746> 1216216768 +0000\ncommitter DOM\\paul <DOM\\paul@28e39a90-19ad-e645-8baa-5c9ab2323746> 1216216768 +0000\n\nWith my name it's just not displaying the backslash, but with names\nstarting with a 't' or even better 'n' it get's more interresting\nas they are shown as tab or newline. And that looks very funny in\nthe commit list view.\n\nciao,\n   Torsten.\n"},{"id":"83946","messageId":"48820534.7080806@gmx.de","threadId":"14498","inReplyTo":"18558.35423.933860.915622@cargo.ozlabs.ibm.com","subject":"Re: gitk: Author/Committer name with special characters","fromName":"Torsten Paul","fromEmail":"torsten.paul@gmx.de","sentAt":"2008-07-19T15:16:04Z","receivedAt":"2008-07-19T15:16:04Z","isPatch":false,"sender":{"key":"torsten.paul@gmx.de","avatar":null},"body":"Paul Mackerras wrote:\n> Something like that, I think, but to be sure I'd like to see the\n> actual author and committer lines that are causing the problem.  Could\n> you send me the output of \"git cat-file commit\" on one of the\n> problematic commits?\n> \nI've created a small script that creates a minimal repo that shows\nthe problem...\n\nciao,\n   Torsten.\n\n\n#!/bin/bash\n\n#\n# Script to generate git commit messages that\n# contain windows style user names. This kind of\n# names are generated when using git-svn with a\n# svn-repo that uses NTLM authentification.\n#\n\nEXT=\"@23e39a30-19ad-a625-8bac-5c9ab2323746\"\n\ndo_commit () {\n         F=test.txt\n         echo \"test$1\" > \"$F\"\n         git add \"$F\"\n\n         M=\"<$2$EXT>\"\n\n         GIT_AUTHOR_NAME=\"$2\" \\\n         GIT_AUTHOR_EMAIL=\"$M\" \\\n         GIT_COMMITTER_NAME=\"$2\" \\\n         GIT_COMMITTER_EMAIL=\"$M\" \\\n         git commit -m \"commit $1\"\n}\n\nDIR=`mktemp -d /tmp/gitk-test.XXXXXXXXXX` || exit 1\ntrap \"rm -rf \\\"$DIR\\\"\" EXIT\ncd $DIR || exit 2\n\ngit init\ndo_commit 1 \"paul\"\ndo_commit 2 \"WIN\\paul\"\ndo_commit 3 \"WIN\\test\"\ndo_commit 4 \"WIN\\nobody\"\ndo_commit 5 \"WIN\\paul\"\ndo_commit 6 \"paul\"\ngitk\n"}]}