{"thread":{"id":"33259","subject":"[FEATURE-REQUEST] difftool --dir-diff: use the commit names as directory names instead of left/right","startedAt":"2013-03-22T16:52:36Z","lastAt":"2013-03-23T15:30:18Z","messageCount":4,"participants":["Christoph Anton Mitterer","David Aguilar","John Keeping"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"211959","messageId":"1363971156.20287.5.camel@heisenberg.scientia.net","threadId":"33259","inReplyTo":null,"subject":"[FEATURE-REQUEST] difftool --dir-diff: use the commit names as directory names instead of left/right","fromName":"Christoph Anton Mitterer","fromEmail":"calestyo@scientia.net","sentAt":"2013-03-22T16:52:36Z","receivedAt":"2013-03-22T16:52:36Z","isPatch":false,"sender":{"key":"calestyo@scientia.net","avatar":"https://gravatar.com/avatar/74cd78048081efac1fcd21e681751ed55968f949a50e33adbe1a41c572a605cd?d=mp&s=160"},"body":"Hi.\n\nRight now, when I use difftool --dir-diff, the temp dirs are creates as\ne.g.:\n/tmp/git-difftool.QqP8x/left\n/tmp/git-difftool.QqP8x/right\n\nWouldn't it be nice, if instead of left/right... the specified commit\nname would be used?\n\ne.g.\n/tmp/git-difftool.QqP8x/r1.1.1\n/tmp/git-difftool.QqP8x/HEAD\nor\n/tmp/git-difftool.QqP8x/fd4e4005a4b7b3e638bc405be020b867f8881e72\n/tmp/git-difftool.QqP8x/ce0747b74fccd20707b6f495068503e69e5473df\n\nCause then, one would see in the difftool which side is what, without\nthe need to remember how git difftool was invoked.\n\n\nOf course one might probably need to escape the commit names if they\ncontain stuff like \"/\" or \"..\", etc.\n\n\n\nCheers,\nChris.\n"},{"id":"212023","messageId":"CAJDDKr6fmvb8AN8AcyO+t=7wqte+6ryhtt_o0CN92Vm-xSdn+A@mail.gmail.com","threadId":"33259","inReplyTo":"1363971156.20287.5.camel@heisenberg.scientia.net","subject":"Re: [FEATURE-REQUEST] difftool --dir-diff: use the commit names as directory names instead of left/right","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-03-23T04:56:17Z","receivedAt":"2013-03-23T04:56:17Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Fri, Mar 22, 2013 at 9:52 AM, Christoph Anton Mitterer\n<calestyo@scientia.net> wrote:\n> Hi.\n>\n> Right now, when I use difftool --dir-diff, the temp dirs are creates as\n> e.g.:\n> /tmp/git-difftool.QqP8x/left\n> /tmp/git-difftool.QqP8x/right\n>\n> Wouldn't it be nice, if instead of left/right... the specified commit\n> name would be used?\n>\n> e.g.\n> /tmp/git-difftool.QqP8x/r1.1.1\n> /tmp/git-difftool.QqP8x/HEAD\n> or\n> /tmp/git-difftool.QqP8x/fd4e4005a4b7b3e638bc405be020b867f8881e72\n> /tmp/git-difftool.QqP8x/ce0747b74fccd20707b6f495068503e69e5473df\n>\n> Cause then, one would see in the difftool which side is what, without\n> the need to remember how git difftool was invoked.\n>\n>\n> Of course one might probably need to escape the commit names if they\n> contain stuff like \"/\" or \"..\", etc.\n\nI can see that being pretty helpful.\nIf we do it we should go all the way.\n\nWhat do you all think about something like the output of\n\"git describe --always\" instead of the SHA-1?\n\n\nBTW there are some patches in-flight around difftool so\nyou'll probably want to apply them first if you're going to\ngive it a try.  patches very much appreciated! ;-)\nIf no one beats me to it, I can give it a try after the weekend.\n-- \nDavid\n"},{"id":"212045","messageId":"20130323123603.GL2283@serenity.lan","threadId":"33259","inReplyTo":"CAJDDKr6fmvb8AN8AcyO+t=7wqte+6ryhtt_o0CN92Vm-xSdn+A@mail.gmail.com","subject":"Re: [FEATURE-REQUEST] difftool --dir-diff: use the commit names as directory names instead of left/right","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2013-03-23T12:36:03Z","receivedAt":"2013-03-23T12:36:03Z","isPatch":false,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"On Fri, Mar 22, 2013 at 09:56:17PM -0700, David Aguilar wrote:\n> On Fri, Mar 22, 2013 at 9:52 AM, Christoph Anton Mitterer\n> <calestyo@scientia.net> wrote:\n> > Hi.\n> >\n> > Right now, when I use difftool --dir-diff, the temp dirs are creates as\n> > e.g.:\n> > /tmp/git-difftool.QqP8x/left\n> > /tmp/git-difftool.QqP8x/right\n> >\n> > Wouldn't it be nice, if instead of left/right... the specified commit\n> > name would be used?\n> >\n> > e.g.\n> > /tmp/git-difftool.QqP8x/r1.1.1\n> > /tmp/git-difftool.QqP8x/HEAD\n> > or\n> > /tmp/git-difftool.QqP8x/fd4e4005a4b7b3e638bc405be020b867f8881e72\n> > /tmp/git-difftool.QqP8x/ce0747b74fccd20707b6f495068503e69e5473df\n> >\n> > Cause then, one would see in the difftool which side is what, without\n> > the need to remember how git difftool was invoked.\n> >\n> >\n> > Of course one might probably need to escape the commit names if they\n> > contain stuff like \"/\" or \"..\", etc.\n> \n> I can see that being pretty helpful.\n> If we do it we should go all the way.\n> \n> What do you all think about something like the output of\n> \"git describe --always\" instead of the SHA-1?\n\nI think Christoph was suggesting that it should use the revision as\nspecified by the user, presumably falling back to HEAD when only one\nrevision has been specified.\n\nThat's likely to be the easiest to understand since git-describe could\nshow \"v1.8.2-134-g328455f\" (or \"remotes/origin/maint-121-g328455f\" with\n--all) where the user specified HEAD^.  I suspect in that case we have\nto be careful about special characters, perhaps it's best to just fall\nback to the SHA1 if we encounter something like\n\"origin/master^{/^diff.c}\" which is likely to cause issues with shell\nquoting.\n\nThe interesting question around this is precisely how commit specifiers\nmap to directory names and at what point (if ever) we give up and use\nthe SHA1.  At the very least we need to translate '/' to something else\n('~' maybe?).\n\n> BTW there are some patches in-flight around difftool so\n> you'll probably want to apply them first if you're going to\n> give it a try.  patches very much appreciated! ;-)\n> If no one beats me to it, I can give it a try after the weekend.\n> -- \n> David\n"},{"id":"212058","messageId":"1364052618.5363.5.camel@fermat.scientia.net","threadId":"33259","inReplyTo":"20130323123603.GL2283@serenity.lan","subject":"Re: [FEATURE-REQUEST] difftool --dir-diff: use the commit names as directory names instead of left/right","fromName":"Christoph Anton Mitterer","fromEmail":"calestyo@scientia.net","sentAt":"2013-03-23T15:30:18Z","receivedAt":"2013-03-23T15:30:18Z","isPatch":false,"sender":{"key":"calestyo@scientia.net","avatar":"https://gravatar.com/avatar/74cd78048081efac1fcd21e681751ed55968f949a50e33adbe1a41c572a605cd?d=mp&s=160"},"body":"On Sat, 2013-03-23 at 12:36 +0000, John Keeping wrote:\n> > What do you all think about something like the output of\n> > \"git describe --always\" instead of the SHA-1?\n> I think Christoph was suggesting that it should use the revision as\n> specified by the user, presumably falling back to HEAD when only one\n> revision has been specified.\nThat was the idea... cause it has the best chance of being somehow\nremembered/recognised by the user...\nTaking any description, doesn't necessarily mean that the user has ever\nseen this before or remembers it.\n\n\n\n> I suspect in that case we have\n> to be careful about special characters, perhaps it's best to just fall\n> back to the SHA1 if we encounter something like\n> \"origin/master^{/^diff.c}\" which is likely to cause issues with shell\n> quoting.\nOr maybe just pseudo-quote any such special characters by \"_\".\nOtherwise,... one might have to many cases, where one falls back to the\nSHA1... and looses a lot of the benefits.\n\n\nCheers,\nChris.\n"}]}