{"thread":{"id":"23984","subject":"[PATCH] documentation: git-mergetool updated to warn against builtin tools invocations","startedAt":"2010-06-02T17:57:33Z","lastAt":"2010-06-07T12:50:33Z","messageCount":6,"participants":["Sylvain Rabot","Junio C Hamano","Michael J Gruber","Ramkumar Ramachandra"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"142833","messageId":"1275501453-13081-1-git-send-email-srabot@steek.com","threadId":"23984","inReplyTo":null,"subject":"[PATCH] documentation: git-mergetool updated to warn against builtin tools invocations","fromName":"Sylvain Rabot","fromEmail":"srabot@steek.com","sentAt":"2010-06-02T17:57:33Z","receivedAt":"2010-06-02T17:57:33Z","isPatch":true,"sender":{"key":"srabot@steek.com","avatar":null},"body":"For known tools such as meld, diffuse, p4merge, git-mergetool ignores the\nmergetool.<tool>.* configurations. It took me a while to understand why my\nmergetool.diffuse.cmd configuration was not taken care of.\n\nThis documentation update warns against this behavior and explains how\nto setup a customized command line invocation for known diff tools.\n\nSigned-off-by: Sylvain Rabot <srabot@steek.com>\n---\n Documentation/git-mergetool.txt |   15 +++++++++++++++\n 1 files changed, 15 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt\nindex 55735fa..ac41d7c 100644\n--- a/Documentation/git-mergetool.txt\n+++ b/Documentation/git-mergetool.txt\n@@ -45,6 +45,21 @@ Instead of running one of the known merge tool programs,\n by specifying the command line to invoke in a configuration\n variable `mergetool.<tool>.cmd`.\n +\n+Be aware that 'git mergetool' has some predefined invocation commands builtin\n+for known diff tools like meld, diffuse, p4merge ... etc. It means that if\n+you set the merge.tool configuration to one of these tools, the \n+mergetool.<tool>.* configurations will not be taken care of. If you\n+really want to customize the invocation of one of these tools, \n+set `merge.tool` to \"custom\" or whatever you want and `mergetool.custom.cmd` \n+to \"/usr/bin/<tool> $LOCAL $MERGED $REMOTE\"\n++\n+-------------\n+[merge]\n+    tool = diffuse-custom\n+[mergetool \"diffuse-custom\"]\n+    cmd = diffuse $LOCAL $MERGED $REMOTE\n+-------------\n++\n When 'git mergetool' is invoked with this tool (either through the\n `-t` or `--tool` option or the `merge.tool` configuration\n variable) the configured command line will be invoked with `$BASE`\n-- \n1.7.1\n"},{"id":"142850","messageId":"7vbpbt9f9j.fsf@alter.siamese.dyndns.org","threadId":"23984","inReplyTo":"1275501453-13081-1-git-send-email-srabot@steek.com","subject":"Re: [PATCH] documentation: git-mergetool updated to warn against builtin tools invocations","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-06-02T23:38:32Z","receivedAt":"2010-06-02T23:38:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sylvain Rabot <srabot@steek.com> writes:\n\n> +Be aware that 'git mergetool' has some predefined invocation commands builtin\n> +for known diff tools like meld, diffuse, p4merge ... etc. It means that if\n> +you set the merge.tool configuration to one of these tools, the\n> +mergetool.<tool>.* configurations will not be taken care of. If you\n> +really want to customize the invocation of one of these tools,\n> +set `merge.tool` to \"custom\" or whatever you want and `mergetool.custom.cmd`\n> +to \"/usr/bin/<tool> $LOCAL $MERGED $REMOTE\"\n\nTwo half-points and three points (that makes them four in total ;-):\n\n o If I read the above without \"It means that\", it still makes sense;\n\n o \"If you really\" can go without \"really\";\n\n * I had to read \"will not be taken care of\" twice; \"are ignored\" is\n   probably easier to understand;\n\n * The description and the example makes it sound as if the command line\n   has to have these three tokens in the given order, but the whole point\n   of this mechanism is that you can launch whatever external command with\n   a custom command line, so \"and `mergetool.custom.cmd` to a command line\n   to invoke the command.  $LOCAL $MERGED and $REMOTE on this command line\n   are substituted by ....\" may be more reader-friendly.\n\n * As a documentation update it is perfectly fine to describe this glitch,\n   but I wonder if we might want to lift this restriction (read: consider\n   this as a bug and fix it).\n\n> ++\n> +-------------\n> +[merge]\n> +    tool = diffuse-custom\n> +[mergetool \"diffuse-custom\"]\n> +    cmd = diffuse $LOCAL $MERGED $REMOTE\n> +-------------\n> ++\n\nThanks.\n"},{"id":"142861","messageId":"4C075D80.70304@drmicha.warpmail.net","threadId":"23984","inReplyTo":"7vbpbt9f9j.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] documentation: git-mergetool updated to warn against builtin tools invocations","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-06-03T07:45:04Z","receivedAt":"2010-06-03T07:45:04Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Junio C Hamano venit, vidit, dixit 03.06.2010 01:38:\n> Sylvain Rabot <srabot@steek.com> writes:\n> \n>> +Be aware that 'git mergetool' has some predefined invocation commands builtin\n>> +for known diff tools like meld, diffuse, p4merge ... etc. It means that if\n>> +you set the merge.tool configuration to one of these tools, the\n>> +mergetool.<tool>.* configurations will not be taken care of. If you\n>> +really want to customize the invocation of one of these tools,\n>> +set `merge.tool` to \"custom\" or whatever you want and `mergetool.custom.cmd`\n>> +to \"/usr/bin/<tool> $LOCAL $MERGED $REMOTE\"\n> \n> Two half-points and three points (that makes them four in total ;-):\n> \n>  o If I read the above without \"It means that\", it still makes sense;\n> \n>  o \"If you really\" can go without \"really\";\n> \n>  * I had to read \"will not be taken care of\" twice; \"are ignored\" is\n>    probably easier to understand;\n> \n>  * The description and the example makes it sound as if the command line\n>    has to have these three tokens in the given order, but the whole point\n>    of this mechanism is that you can launch whatever external command with\n>    a custom command line, so \"and `mergetool.custom.cmd` to a command line\n>    to invoke the command.  $LOCAL $MERGED and $REMOTE on this command line\n>    are substituted by ....\" may be more reader-friendly.\n> \n>  * As a documentation update it is perfectly fine to describe this glitch,\n>    but I wonder if we might want to lift this restriction (read: consider\n>    this as a bug and fix it).\n\nDefinitely. The current behaviour even means that when you have set up\nfancytool, and then a new git-mergetool version suddenly starts to\nsupport fancytool, possibly with different options, your existing\nconfiguration breaks. I.e., even for currently unsupported tools you\nhave to use the procedure Silvain describes in order to protect against\nupdates!\n\nMichael\n"},{"id":"142871","messageId":"AANLkTikPHdRWsHUI-YwEkECtIbj425hKxzy8_JrA4_ny@mail.gmail.com","threadId":"23984","inReplyTo":"7vbpbt9f9j.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] documentation: git-mergetool updated to warn against builtin tools invocations","fromName":"Sylvain Rabot","fromEmail":"sylvain@abstraction.fr","sentAt":"2010-06-03T10:55:52Z","receivedAt":"2010-06-03T10:55:52Z","isPatch":true,"sender":{"key":"sylvain@abstraction.fr","avatar":"https://avatars.githubusercontent.com/u/153052?v=4"},"body":"On Thu, Jun 3, 2010 at 01:38, Junio C Hamano <gitster@pobox.com> wrote:\n> Sylvain Rabot <srabot@steek.com> writes:\n>\n>> +Be aware that 'git mergetool' has some predefined invocation commands builtin\n>> +for known diff tools like meld, diffuse, p4merge ... etc. It means that if\n>> +you set the merge.tool configuration to one of these tools, the\n>> +mergetool.<tool>.* configurations will not be taken care of. If you\n>> +really want to customize the invocation of one of these tools,\n>> +set `merge.tool` to \"custom\" or whatever you want and `mergetool.custom.cmd`\n>> +to \"/usr/bin/<tool> $LOCAL $MERGED $REMOTE\"\n>\n> Two half-points and three points (that makes them four in total ;-):\n>\n>  o If I read the above without \"It means that\", it still makes sense;\n\nOk\n\n>\n>  o \"If you really\" can go without \"really\";\n\nOk\n\n>\n>  * I had to read \"will not be taken care of\" twice; \"are ignored\" is\n>   probably easier to understand;\n\nOk\n\n>\n>  * The description and the example makes it sound as if the command line\n>   has to have these three tokens in the given order, but the whole point\n>   of this mechanism is that you can launch whatever external command with\n>   a custom command line, so \"and `mergetool.custom.cmd` to a command line\n>   to invoke the command.  $LOCAL $MERGED and $REMOTE on this command line\n>   are substituted by ....\" may be more reader-friendly.\n\nOk\n\n>\n>  * As a documentation update it is perfectly fine to describe this glitch,\n>   but I wonder if we might want to lift this restriction (read: consider\n>   this as a bug and fix it).\n\nI agree, I wil take a look, I'm not a sh expert but I can try.\nIf I succeed I will send you a patch, otherwise I will send you a\ncorrected version of this patch.\n\n>\n>> ++\n>> +-------------\n>> +[merge]\n>> +    tool = diffuse-custom\n>> +[mergetool \"diffuse-custom\"]\n>> +    cmd = diffuse $LOCAL $MERGED $REMOTE\n>> +-------------\n>> ++\n>\n> Thanks.\n>\n\n-- \nSylvain\n"},{"id":"143004","messageId":"1275686970.2510.1.camel@kheops","threadId":"23984","inReplyTo":"AANLkTikPHdRWsHUI-YwEkECtIbj425hKxzy8_JrA4_ny@mail.gmail.com","subject":"Re: [PATCH] documentation: git-mergetool updated to warn against builtin tools invocations","fromName":"Sylvain Rabot","fromEmail":"sylvain@abstraction.fr","sentAt":"2010-06-04T21:29:30Z","receivedAt":"2010-06-04T21:29:30Z","isPatch":true,"sender":{"key":"sylvain@abstraction.fr","avatar":"https://avatars.githubusercontent.com/u/153052?v=4"},"body":"On Thu, 2010-06-03 at 12:55 +0200, Sylvain Rabot wrote:\n> On Thu, Jun 3, 2010 at 01:38, Junio C Hamano <gitster@pobox.com> wrote:\n> > Sylvain Rabot <srabot@steek.com> writes:\n> >\n> >> +Be aware that 'git mergetool' has some predefined invocation commands builtin\n> >> +for known diff tools like meld, diffuse, p4merge ... etc. It means that if\n> >> +you set the merge.tool configuration to one of these tools, the\n> >> +mergetool.<tool>.* configurations will not be taken care of. If you\n> >> +really want to customize the invocation of one of these tools,\n> >> +set `merge.tool` to \"custom\" or whatever you want and `mergetool.custom.cmd`\n> >> +to \"/usr/bin/<tool> $LOCAL $MERGED $REMOTE\"\n> >\n> > Two half-points and three points (that makes them four in total ;-):\n> >\n> >  o If I read the above without \"It means that\", it still makes sense;\n> \n> Ok\n> \n> >\n> >  o \"If you really\" can go without \"really\";\n> \n> Ok\n> \n> >\n> >  * I had to read \"will not be taken care of\" twice; \"are ignored\" is\n> >   probably easier to understand;\n> \n> Ok\n> \n> >\n> >  * The description and the example makes it sound as if the command line\n> >   has to have these three tokens in the given order, but the whole point\n> >   of this mechanism is that you can launch whatever external command with\n> >   a custom command line, so \"and `mergetool.custom.cmd` to a command line\n> >   to invoke the command.  $LOCAL $MERGED and $REMOTE on this command line\n> >   are substituted by ....\" may be more reader-friendly.\n> \n> Ok\n> \n> >\n> >  * As a documentation update it is perfectly fine to describe this glitch,\n> >   but I wonder if we might want to lift this restriction (read: consider\n> >   this as a bug and fix it).\n> \n> I agree, I wil take a look, I'm not a sh expert but I can try.\n> If I succeed I will send you a patch, otherwise I will send you a\n> corrected version of this patch.\n\nI'm about to send a patch, before, can I assume that all users have\nsed ? \n\n> \n> >\n> >> ++\n> >> +-------------\n> >> +[merge]\n> >> +    tool = diffuse-custom\n> >> +[mergetool \"diffuse-custom\"]\n> >> +    cmd = diffuse $LOCAL $MERGED $REMOTE\n> >> +-------------\n> >> ++\n> >\n> > Thanks.\n> >\n> \n\n-- \nSylvain Rabot <sylvain@abstraction.fr>\n"},{"id":"143153","messageId":"AANLkTik4zQTLrLZ3Jr6mXsQ2Pi6j5FbMYNJvmBH51bkE@mail.gmail.com","threadId":"23984","inReplyTo":"1275686970.2510.1.camel@kheops","subject":"Re: [PATCH] documentation: git-mergetool updated to warn against builtin tools invocations","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-06-07T12:50:33Z","receivedAt":"2010-06-07T12:50:33Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi,\n\nSylvain Rabot wrote:\n> I'm about to send a patch, before, can I assume that all users have\n> sed ?\n\nYes. $(git grep sed *.sh) revels that sed is referred to in several\nexisting shell scripts already.\n\n-- Ram\n"}]}