{"thread":{"id":"32711","subject":"[PATCH] git-svn: cleanup sprintf usage for uppercasing hex","startedAt":"2013-01-24T01:28:10Z","lastAt":"2013-01-24T10:25:25Z","messageCount":4,"participants":["Eric Wong","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"207654","messageId":"20130124012810.GA8096@dcvr.yhbt.net","threadId":"32711","inReplyTo":null,"subject":"[PATCH] git-svn: cleanup sprintf usage for uppercasing hex","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2013-01-24T01:28:10Z","receivedAt":"2013-01-24T01:28:10Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"We do not need to call uc() separately for sprintf(\"%x\")\nas sprintf(\"%X\") is available.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n perl/Git/SVN.pm        | 4 ++--\n perl/Git/SVN/Editor.pm | 2 +-\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm\nindex 59215fa..490e330 100644\n--- a/perl/Git/SVN.pm\n+++ b/perl/Git/SVN.pm\n@@ -490,7 +490,7 @@ sub refname {\n \t#\n \t# Additionally, % must be escaped because it is used for escaping\n \t# and we want our escaped refname to be reversible\n-\t$refname =~ s{([ \\%~\\^:\\?\\*\\[\\t])}{uc sprintf('%%%02x',ord($1))}eg;\n+\t$refname =~ s{([ \\%~\\^:\\?\\*\\[\\t])}{sprintf('%%%02X',ord($1))}eg;\n \n \t# no slash-separated component can begin with a dot .\n \t# /.* becomes /%2E*\n@@ -2377,7 +2377,7 @@ sub map_path {\n \n sub uri_encode {\n \tmy ($f) = @_;\n-\t$f =~ s#([^a-zA-Z0-9\\*!\\:_\\./\\-])#uc sprintf(\"%%%02x\",ord($1))#eg;\n+\t$f =~ s#([^a-zA-Z0-9\\*!\\:_\\./\\-])#sprintf(\"%%%02X\",ord($1))#eg;\n \t$f\n }\n \ndiff --git a/perl/Git/SVN/Editor.pm b/perl/Git/SVN/Editor.pm\nindex 3db1521..fa0d3c6 100644\n--- a/perl/Git/SVN/Editor.pm\n+++ b/perl/Git/SVN/Editor.pm\n@@ -146,7 +146,7 @@ sub url_path {\n \tmy ($self, $path) = @_;\n \tif ($self->{url} =~ m#^https?://#) {\n \t\t# characters are taken from subversion/libsvn_subr/path.c\n-\t\t$path =~ s#([^~a-zA-Z0-9_./!$&'()*+,-])#uc sprintf(\"%%%02x\",ord($1))#eg;\n+\t\t$path =~ s#([^~a-zA-Z0-9_./!$&'()*+,-])#sprintf(\"%%%02X\",ord($1))#eg;\n \t}\n \t$self->{url} . '/' . $self->repo_path($path);\n }\n-- \nEric Wong\n"},{"id":"207656","messageId":"20130124013254.GB8096@dcvr.yhbt.net","threadId":"32711","inReplyTo":"20130124012810.GA8096@dcvr.yhbt.net","subject":"[PULL] git-svn updates for master","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2013-01-24T01:32:54Z","receivedAt":"2013-01-24T01:32:54Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"The following changes since commit ec3ae6ec46ed48383ae40643990f169b65a563cc:\n\n  Merge git://ozlabs.org/~paulus/gitk (2013-01-23 08:35:03 -0800)\n\nare available in the git repository at:\n\n\n  git://bogomips.org/git-svn master\n\nfor you to fetch changes up to 812ed405ac961093b7eb916246d5f288630edfb2:\n\n  git-svn: cleanup sprintf usage for uppercasing hex (2013-01-24 01:30:04 +0000)\n\n----------------------------------------------------------------\nBarry Wardell (1):\n      git-svn: Simplify calculation of GIT_DIR\n\nEric Wong (1):\n      git-svn: cleanup sprintf usage for uppercasing hex\n\n git-svn.perl             | 38 +++++++++++++++-----------------------\n perl/Git/SVN.pm          |  4 ++--\n perl/Git/SVN/Editor.pm   |  2 +-\n t/t9100-git-svn-basic.sh |  8 ++++++++\n 4 files changed, 26 insertions(+), 26 deletions(-)\n\n-- \nEric Wong\n"},{"id":"207657","messageId":"20130124013322.GC27174@google.com","threadId":"32711","inReplyTo":"20130124012810.GA8096@dcvr.yhbt.net","subject":"Re: [PATCH] git-svn: cleanup sprintf usage for uppercasing hex","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-01-24T01:33:22Z","receivedAt":"2013-01-24T01:33:22Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Eric Wong wrote:\n\n> We do not need to call uc() separately for sprintf(\"%x\")\n> as sprintf(\"%X\") is available.\n\nFor what it's worth,\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n"},{"id":"207687","messageId":"20130124102525.GA22425@dcvr.yhbt.net","threadId":"32711","inReplyTo":"20130124013254.GB8096@dcvr.yhbt.net","subject":"[PULL (updated)] git-svn updates for master","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2013-01-24T10:25:25Z","receivedAt":"2013-01-24T10:25:25Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"I've squashed the change I mentioned in\nhttp://mid.gmane.org/20130124101417.GA22138@dcvr.yhbt.net\nto Barry's commit, and added Jonathan's Reviewed-by to my cleanup\ncommit.\n\nThe following changes since commit ec3ae6ec46ed48383ae40643990f169b65a563cc:\n\n  Merge git://ozlabs.org/~paulus/gitk (2013-01-23 08:35:03 -0800)\n\nare available in the git repository at:\n\n\n  git://bogomips.org/git-svn for-junio\n\nfor you to fetch changes up to bc93ceb7c5ec959ad275f575a3c49ff491337a8b:\n\n  git-svn: Simplify calculation of GIT_DIR (2013-01-24 10:21:23 +0000)\n\n(My old master is unchanged.)\n\n----------------------------------------------------------------\nBarry Wardell (1):\n      git-svn: Simplify calculation of GIT_DIR\n\nEric Wong (1):\n      git-svn: cleanup sprintf usage for uppercasing hex\n\n git-svn.perl             | 37 ++++++++++++++-----------------------\n perl/Git/SVN.pm          |  4 ++--\n perl/Git/SVN/Editor.pm   |  2 +-\n t/t9100-git-svn-basic.sh |  8 ++++++++\n 4 files changed, 25 insertions(+), 26 deletions(-)\n-- \nEric Wong\n"}]}