{"thread":{"id":"9365","subject":"[PATCH] git-gui: Added support for OS X right click","startedAt":"2007-08-03T09:27:39Z","lastAt":"2007-08-05T02:48:44Z","messageCount":10,"participants":["Väinö Järvelä","Shawn O. Pearce","Jeff King","Linus Torvalds"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"49572","messageId":"C4431971-A1F1-463E-B238-D351FCBB57F8@pp.inet.fi","threadId":"9365","inReplyTo":null,"subject":"[PATCH] git-gui: Added support for OS X right click","fromName":"Väinö Järvelä","fromEmail":"v@pp.inet.fi","sentAt":"2007-08-03T09:27:39Z","receivedAt":"2007-08-03T09:27:39Z","isPatch":true,"sender":{"key":"v@pp.inet.fi","avatar":null},"body":"OS X sends Button-2 on a \"real\" right click, such as with a three\nbutton mouse, or by using the two-finger trackpad click.\n\nSigned-off-by: Väinö Järvelä <v@pp.inet.fi>\n---\ngit-gui.sh |    3 +++\n1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/git-gui.sh b/git-gui.sh\nindex 2c7eb3c..29a790e 100755\n--- a/git-gui.sh\n+++ b/git-gui.sh\n@@ -1348,6 +1348,9 @@ unset i\nproc bind_button3 {w cmd} {\n\tbind $w <Any-Button-3> $cmd\n\tif {[is_MacOSX]} {\n+\t\t# Mac OS X sends Button-2 on right click through three-button mouse,\n+\t\t# or through trackpad right-clicking (two-finger touch + click).\n+\t\tbind $w <Any-Button-2> $cmd\n\t\tbind $w <Control-Button-1> $cmd\n\t}\n}\n--\n1.5.2\n"},{"id":"49674","messageId":"20070804065516.GS20052@spearce.org","threadId":"9365","inReplyTo":"C4431971-A1F1-463E-B238-D351FCBB57F8@pp.inet.fi","subject":"Re: [PATCH] git-gui: Added support for OS X right click","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-08-04T06:55:16Z","receivedAt":"2007-08-04T06:55:16Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"V??in?? J??rvel?? <v@pp.inet.fi> wrote:\n> OS X sends Button-2 on a \"real\" right click, such as with a three\n> button mouse, or by using the two-finger trackpad click.\n\nThanks, this will be in 0.8.1.  I'm pushing it out shortly.\n\nI had a devil of a time applying your patch though.  git-am\nchoked because the patch was whitespace damaged, and then after\nhand-correction and resuming it horribly munged your name's encoding\nin the commit.  I think there's a bug in there in git-am; I'll\nhave to try to track it down.  I managed to get the patch applied\ncorrectly by editing the mbox file directly, so that git-am did\nnot need to stop and ask me to resolve the patch.\n\nIt seems that Apple's Mail.app just doesn't like to send patches\nwithout destroying them.  If you do wind up sending another patch\nin the future it may just be easier if you attach the mbox that\nformat-patch creates, instead of trying to inline it in the\nmessage body.\n\n-- \nShawn.\n"},{"id":"49677","messageId":"20070804071131.GA6557@coredump.intra.peff.net","threadId":"9365","inReplyTo":"20070804065516.GS20052@spearce.org","subject":"Re: [PATCH] git-gui: Added support for OS X right click","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-08-04T07:11:31Z","receivedAt":"2007-08-04T07:11:31Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Aug 04, 2007 at 02:55:16AM -0400, Shawn O. Pearce wrote:\n\n> V??in?? J??rvel?? <v@pp.inet.fi> wrote:\n\nYour mailer claims this message is in us-ascii, but I think it isn't...\n\n> I had a devil of a time applying your patch though.  git-am\n> choked because the patch was whitespace damaged, and then after\n> hand-correction and resuming it horribly munged your name's encoding\n> in the commit.  I think there's a bug in there in git-am; I'll\n> have to try to track it down.  I managed to get the patch applied\n> correctly by editing the mbox file directly, so that git-am did\n> not need to stop and ask me to resolve the patch.\n\nI tried reproducing the encoding breakage and it ended up fine. I just\nedited the patch in the .dotest directory (looks like the leading spaces\nwere all stripped) and it applied fine when I re-ran \"git-am\".\n\nAre you sure it didn't get munged by your editor when you hand-edited\nthe mbox file?\n\n-Peff\n"},{"id":"49681","messageId":"20070804073321.GU20052@spearce.org","threadId":"9365","inReplyTo":"20070804071131.GA6557@coredump.intra.peff.net","subject":"Re: [PATCH] git-gui: Added support for OS X right click","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-08-04T07:33:21Z","receivedAt":"2007-08-04T07:33:21Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Jeff King <peff@peff.net> wrote:\n> On Sat, Aug 04, 2007 at 02:55:16AM -0400, Shawn O. Pearce wrote:\n> \n> > V??in?? J??rvel?? <v@pp.inet.fi> wrote:\n> \n> Your mailer claims this message is in us-ascii, but I think it isn't...\n\nMy mutt-foo isn't very good.  I tried to tell it utf-8, but I think\nits ignoring me:\n\n  set allow_8bit=yes\n  set charset=utf8\n\n:-/\n \n> I tried reproducing the encoding breakage and it ended up fine. I just\n> edited the patch in the .dotest directory (looks like the leading spaces\n> were all stripped) and it applied fine when I re-ran \"git-am\".\n> \n> Are you sure it didn't get munged by your editor when you hand-edited\n> the mbox file?\n\nI just tried to reproduce it myself and I can't do whatever I did\nbefore again now; it Just Works(tm).  *sigh*  No idea how I messed\nthe patch application up earlier, but I did.\n\nIt wasn't my patch editing.  My vi clone only works on bytes, so\nit doesn't care about character encodings and won't mangle them\nunless I edit a utf-8 multibyte sequence by hand.  Which I'm sure\nI didn't do.  And the first time I messed up the apply I was fixing\nup only .dotest/patch, which was most certainly just us-ascii.\n\nI'm actually pretty good about making sure I don't munge people's\nnon-ASCII names, but my mutt seems to think us-ascii is the only\ncharacter encoding in the world.\n\n-- \nShawn.\n"},{"id":"49683","messageId":"20070804074150.GA7738@coredump.intra.peff.net","threadId":"9365","inReplyTo":"20070804073321.GU20052@spearce.org","subject":"Re: [PATCH] git-gui: Added support for OS X right click","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-08-04T07:41:50Z","receivedAt":"2007-08-04T07:41:50Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Aug 04, 2007 at 03:33:21AM -0400, Shawn O. Pearce wrote:\n\n> My mutt-foo isn't very good.  I tried to tell it utf-8, but I think\n> its ignoring me:\n> \n>   set allow_8bit=yes\n>   set charset=utf8\n\nTry looking at the send_charset config option; by default mutt will try\nto send us-ascii if possible. Also, should it be \"utf-8\"?\n\n> I just tried to reproduce it myself and I can't do whatever I did\n> before again now; it Just Works(tm).  *sigh*  No idea how I messed\n> the patch application up earlier, but I did.\n\nOK, given that I couldn't reproduce it either, we should perhaps chalk\nit up to cosmic rays.\n\n-Peff\n"},{"id":"49696","messageId":"AB48D3D9-0773-4492-A3C8-7B5992BE9E06@pp.inet.fi","threadId":"9365","inReplyTo":"20070804065516.GS20052@spearce.org","subject":"Re: [PATCH] git-gui: Added support for OS X right click","fromName":"Väinö Järvelä","fromEmail":"v@pp.inet.fi","sentAt":"2007-08-04T11:36:47Z","receivedAt":"2007-08-04T11:36:47Z","isPatch":true,"sender":{"key":"v@pp.inet.fi","avatar":null},"body":"On Aug 4, 2007, at 09:55, Shawn O. Pearce wrote:\n\n> I had a devil of a time applying your patch though.  git-am\n> choked because the patch was whitespace damaged, and then after\n> hand-correction and resuming it horribly munged your name's encoding\n> in the commit.  I think there's a bug in there in git-am; I'll\n> have to try to track it down.  I managed to get the patch applied\n> correctly by editing the mbox file directly, so that git-am did\n> not need to stop and ask me to resolve the patch.\n\nYou are right in that Mail.app seems to eat up the whitespaces in the  \npatch. I emailed the patch first to myself, and everything seemed  \nfine, should have tested it with git-am rather than eyeballing it,  \nsorry.\n\nAbout the name-munging, that didn't happen for me, after i fixed the  \nspacing with Vim, the name shows up correctly in Git log. It seems  \nthat the email is ISO-8859-1 encoded, I'll enforce UTF-8  encoding  \nnext time if it helps, and I'll see if I can send an inlined patch  \nwhich works.\n\n--\nVäinö\n"},{"id":"49753","messageId":"alpine.LFD.0.999.0708040928350.5037@woody.linux-foundation.org","threadId":"9365","inReplyTo":"20070804071131.GA6557@coredump.intra.peff.net","subject":"Re: [PATCH] git-gui: Added support for OS X right click","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-08-04T16:37:17Z","receivedAt":"2007-08-04T16:37:17Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 4 Aug 2007, Jeff King wrote:\n>\n> On Sat, Aug 04, 2007 at 02:55:16AM -0400, Shawn O. Pearce wrote:\n> \n> > V??in?? J??rvel?? <v@pp.inet.fi> wrote:\n> \n> Your mailer claims this message is in us-ascii, but I think it isn't...\n\nActually, the email claims it was iso-latin1, at least here. Which the \n*body* of the email apparently really was.\n\nHowever (and this is a pretty common thing), the *headers* are \nunspecified, and a lot of email clients seem to think that if that \nhappens, they default to US-ASCII and think that those iso-latin1 \ncharacters are crud.\n\nWhich is a damn shame. \"alpine\" does this, and it irritates me no end. I \nsee emails where I can read the body fine, but it shows '????' for subject \nlines and authors even though it's the exact same character set.\n\nStupid, stupid, stupid.\n\nDammit, if the thing says\n\n\tContent-type: text/plain; charset=ISO-8859-1; format=flowed\n\n(which it did), then yes, by some idiotic reading of the RFC's that \nprobably only affects the body of the email. But those headers (and the \n\"From:\" line in particular) were *also* in ISO-8859-1, and email clients \nshould default to using the same character set unless something else is \nsaid.\n\nBtw, I suspect git \"mailsplit\" gets this wrong too. I rant and rave, but \nin the end, I solved it by just having the code guess sanely (commit \nb59d398beab604e577846ef8393735478c1ca3c2 makes things come out right in \npractice, regardless) instead of trying to do something \"technically \ncorrect\".\n\n\t\t\tLinus\n"},{"id":"49761","messageId":"20070804174945.GA17113@sigill.intra.peff.net","threadId":"9365","inReplyTo":"alpine.LFD.0.999.0708040928350.5037@woody.linux-foundation.org","subject":"Re: [PATCH] git-gui: Added support for OS X right click","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-08-04T17:49:45Z","receivedAt":"2007-08-04T17:49:45Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Aug 04, 2007 at 09:37:17AM -0700, Linus Torvalds wrote:\n\n> > Your mailer claims this message is in us-ascii, but I think it isn't...\n> \n> Actually, the email claims it was iso-latin1, at least here. Which the \n> *body* of the email apparently really was.\n\nI think something is munging along the way for at least one of us. My\ncopy of the mail clearly says:\n\n  Content-type: text/plain; charset=us-ascii\n\nand it has been through nothing between vger and my disk except qmail\n(and there tends to be no munging there, since qmail accepts 8bit smtp).\n\nThe \"from\" header, on the other hand, is encoded in rfc2047-style\niso-8859-1.\n\n-Peff\n"},{"id":"49764","messageId":"20070804175826.GC17113@sigill.intra.peff.net","threadId":"9365","inReplyTo":"alpine.LFD.0.999.0708040928350.5037@woody.linux-foundation.org","subject":"Re: [PATCH] git-gui: Added support for OS X right click","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-08-04T17:58:26Z","receivedAt":"2007-08-04T17:58:26Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Aug 04, 2007 at 09:37:17AM -0700, Linus Torvalds wrote:\n\n> However (and this is a pretty common thing), the *headers* are \n> unspecified, and a lot of email clients seem to think that if that \n> happens, they default to US-ASCII and think that those iso-latin1 \n> characters are crud.\n\nWell, that _is_ what the standard says, I believe. I agree with you that\npractice is more important than a standard, and if there are high-bit\ncharacters in the 'From' field, I think that using the body charset is a\nreasonable guess (although keep in mind that the \"body\" could be hidden\nbelow a multipart/mixed,  multipart/alternative, or some other arcane\nstructure).\n\nBut I really have no idea why fully mime-aware mailers refuse to use\nrfc2047 encoding of the headers. In fact, my copy of the message you\nsent (to which I am replying) has munged Väinö's name in the cc header,\nbecause it failed to use rfc2047 encoding. I'm surprised that alpine\nwould fail to get that right.\n\n-Peff\n"},{"id":"49797","messageId":"20070805024843.GB9527@spearce.org","threadId":"9365","inReplyTo":"20070804074150.GA7738@coredump.intra.peff.net","subject":"Re: [PATCH] git-gui: Added support for OS X right click","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-08-05T02:48:44Z","receivedAt":"2007-08-05T02:48:44Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Jeff King <peff@peff.net> wrote:\n> On Sat, Aug 04, 2007 at 03:33:21AM -0400, Shawn O. Pearce wrote:\n> \n> > My mutt-foo isn't very good.  I tried to tell it utf-8, but I think\n> > its ignoring me:\n> \n> Try looking at the send_charset config option; by default mutt will try\n> to send us-ascii if possible. Also, should it be \"utf-8\"?\n\nThanks, that actually did the trick.  This message might actually\narrive to you encoded in UTF-8.  Not that it matters.  ;-)\n \n> > I just tried to reproduce it myself and I can't do whatever I did\n> > before again now; it Just Works(tm).  *sigh*  No idea how I messed\n> > the patch application up earlier, but I did.\n> \n> OK, given that I couldn't reproduce it either, we should perhaps chalk\n> it up to cosmic rays.\n\nOr more likely the gap between the keyboard and the chair (aka me).\nI may have actually done something at one point to damage that mbox.\ngit-am ran anyway, but gave me a garbled author name.  Always blame\nthe user, it probably really is his fault.  ;-)\n\n-- \nShawn.\n"}]}