{"thread":{"id":"21973","subject":"diff attribute ignored by show and log -p","startedAt":"2009-12-17T04:46:56Z","lastAt":"2009-12-17T20:24:59Z","messageCount":5,"participants":["Jay Soffian","Nanako Shiraishi","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"130016","messageId":"76718490912162046k36e2a275gaf7672b38c7a63e4@mail.gmail.com","threadId":"21973","inReplyTo":null,"subject":"diff attribute ignored by show and log -p","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2009-12-17T04:46:56Z","receivedAt":"2009-12-17T04:46:56Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"% cat .git/info/attributes\n*.xib diff=xibdiff\n% cat $(git config diff.xibdiff.command)\n#!/bin/sh\ntrap \"rm -f \\\"$2.tmp\\\" \\\"$5.tmp\\\"\" 0 1 2 3 15\nibtool --all \"$2\" > \"$2\".tmp\nibtool --all \"$5\" > \"$5\".tmp\ncolordiff -u \"$2.tmp\" \"$5.tmp\"\n\nWorks great for things like:\n\n% git diff <commit1> <commit2> -- /path/to/*.xib\n\nBut is apparently ignored by \"git log -p\" and \"git show\" which just\nuse internal diff. Is this behavior intentional?\n\nj.\n"},{"id":"130017","messageId":"76718490912162123r49f9bd90n8e032c144d0cdbac@mail.gmail.com","threadId":"21973","inReplyTo":"76718490912162046k36e2a275gaf7672b38c7a63e4@mail.gmail.com","subject":"Re: diff attribute ignored by show and log -p","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2009-12-17T05:23:49Z","receivedAt":"2009-12-17T05:23:49Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Wed, Dec 16, 2009 at 11:46 PM, Jay Soffian <jaysoffian@gmail.com> wrote:\n> % cat .git/info/attributes\n> *.xib diff=xibdiff\n> % cat $(git config diff.xibdiff.command)\n> #!/bin/sh\n> trap \"rm -f \\\"$2.tmp\\\" \\\"$5.tmp\\\"\" 0 1 2 3 15\n> ibtool --all \"$2\" > \"$2\".tmp\n> ibtool --all \"$5\" > \"$5\".tmp\n> colordiff -u \"$2.tmp\" \"$5.tmp\"\n>\n> Works great for things like:\n>\n> % git diff <commit1> <commit2> -- /path/to/*.xib\n>\n> But is apparently ignored by \"git log -p\" and \"git show\" which just\n> use internal diff. Is this behavior intentional?\n\nAh, --ext-diff, and the reasoning behind requiring it for log/show is\nexplained in 72909be.\n\nj.\n"},{"id":"130031","messageId":"20091217221740.6117@nanako3.lavabit.com","threadId":"21973","inReplyTo":"76718490912162123r49f9bd90n8e032c144d0cdbac@mail.gmail.com","subject":"Re: diff attribute ignored by show and log -p","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2009-12-17T13:17:40Z","receivedAt":"2009-12-17T13:17:40Z","isPatch":false,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Jay Soffian <jaysoffian@gmail.com>\n\n>> But is apparently ignored by \"git log -p\" and \"git show\" which just\n>> use internal diff. Is this behavior intentional?\n>\n> Ah, --ext-diff, and the reasoning behind requiring it for log/show is\n> explained in 72909be.\n\nThe need to give --ext-diff is mentioned in 72909be (Add diff-option\n--ext-diff, 2007-06-30) but its log message doesn't 'explain' why external\ndiff isn't used by default and you need to pass that extra option.\n\nProbably --ext-diff should be the default?\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"},{"id":"130036","messageId":"76718490912170844i7d5f25d1hc32590b877dbf295@mail.gmail.com","threadId":"21973","inReplyTo":"20091217221740.6117@nanako3.lavabit.com","subject":"Re: diff attribute ignored by show and log -p","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2009-12-17T16:44:16Z","receivedAt":"2009-12-17T16:44:16Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Thu, Dec 17, 2009 at 8:17 AM, Nanako Shiraishi <nanako3@lavabit.com> wrote:\n> Quoting Jay Soffian <jaysoffian@gmail.com>\n>\n>>> But is apparently ignored by \"git log -p\" and \"git show\" which just\n>>> use internal diff. Is this behavior intentional?\n>>\n>> Ah, --ext-diff, and the reasoning behind requiring it for log/show is\n>> explained in 72909be.\n>\n> The need to give --ext-diff is mentioned in 72909be (Add diff-option\n> --ext-diff, 2007-06-30) but its log message doesn't 'explain' why external\n> diff isn't used by default and you need to pass that extra option.\n\n\"To prevent funky games with external diff engines, git-log and\nfriends prevent external diff engines from being called.\"\n\nSeemed reason enough to me.\n\n> Probably --ext-diff should be the default?\n\nOr available via a config option anyway.\n\nj.\n"},{"id":"130041","messageId":"20091217202459.GC11367@sigill.intra.peff.net","threadId":"21973","inReplyTo":"76718490912170844i7d5f25d1hc32590b877dbf295@mail.gmail.com","subject":"Re: diff attribute ignored by show and log -p","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-12-17T20:24:59Z","receivedAt":"2009-12-17T20:24:59Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Dec 17, 2009 at 11:44:16AM -0500, Jay Soffian wrote:\n\n> > The need to give --ext-diff is mentioned in 72909be (Add diff-option\n> > --ext-diff, 2007-06-30) but its log message doesn't 'explain' why external\n> > diff isn't used by default and you need to pass that extra option.\n> \n> \"To prevent funky games with external diff engines, git-log and\n> friends prevent external diff engines from being called.\"\n> \n> Seemed reason enough to me.\n\nI don't remember discussing it at that time, but much later when\ntouching the external diff code and adding textconv, Junio and I came to\nthe conclusion that textconv was reasonable to do as part of \"git log\n-p\", as the result is just an internal conversion that still results in\na text diff. Whereas an external diff might be terribly confusing, as it\ncould be spawning graphical viewers or producing output which does not\nmatch well with the log output.\n\n> > Probably --ext-diff should be the default?\n> \n> Or available via a config option anyway.\n\nIf you were going to do such a config option, it might make sense to\nmake it an attribute of the diff driver rather than a global \"use\nexternal diff\". Then each diff driver could say \"Yes, I am reasonable to\nbe run as part of log -p\".\n\n-Peff\n"}]}