{"thread":{"id":"11319","subject":"[PATCH] Document diff.external and mergetool.<tool>.path","startedAt":"2007-12-17T12:21:22Z","lastAt":"2007-12-18T01:00:58Z","messageCount":6,"participants":["Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"63413","messageId":"Pine.LNX.4.64.0712171220540.9446@racer.site","threadId":"11319","inReplyTo":"E6DFE65BB5ADFE44BE13CCC976124447D5BB8D@fue-email2.ad.mc.com","subject":"[PATCH] Document diff.external and mergetool.<tool>.path","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-12-17T12:21:22Z","receivedAt":"2007-12-17T12:21:22Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nThere was no documentation for the config variables diff.external\nand mergetool.<tool>.path.\n\nNoticed by Sebastian Schuberth.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n Documentation/config.txt |   11 +++++++++++\n 1 files changed, 11 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex ce16fc7..8a0df57 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -448,6 +448,13 @@ diff.autorefreshindex::\n \taffects only `git diff` Porcelain, and not lower level\n \t`diff` commands, such as `git diff-files`.\n \n+diff.external::\n+\tIf this config variable is set, diff generation is not\n+\tperformed using the internal diff machinery, but using the\n+\tgiven command.  Note: if you want to use an external diff\n+\tprogram only on a subset of your files, you might want to\n+\tuse gitlink:gitattributes[5] instead.\n+\n diff.renameLimit::\n \tThe number of files to consider when performing the copy/rename\n \tdetection; equivalent to the git diff option '-l'.\n@@ -671,6 +678,10 @@ merge.<driver>.recursive::\n \tperforming an internal merge between common ancestors.\n \tSee gitlink:gitattributes[5] for details.\n \n+mergetool.<tool>.path::\n+\tOverride the path for the given tool.  This is useful in case\n+\tyour tool is not in the PATH.\n+\n pack.window::\n \tThe size of the window used by gitlink:git-pack-objects[1] when no\n \twindow size is given on the command line. Defaults to 10.\n-- \n1.5.4.rc0.36.g7680\n"},{"id":"63424","messageId":"Pine.LNX.4.64.0712171341110.9446@racer.site","threadId":"11319","inReplyTo":"Pine.LNX.4.64.0712171220540.9446@racer.site","subject":"[PATCH] Actually add config variable diff.external","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-12-17T13:42:20Z","receivedAt":"2007-12-17T13:42:20Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nWe had the diff.external variable in the documentation of the config\nfile since its conception, but failed to respect it.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tOn Mon, 17 Dec 2007, Johannes Schindelin wrote:\n\n\t> Subject: [PATCH] Document diff.external and mergetool.<tool>.path\n\t> \n\t> There was no documentation for the config variables \n\t> diff.external and mergetool.<tool>.path.\n\n\tHeh.  Missed that diff.external was actually never implemented...\n\n\tAlso noticed by Sebastian.\n\n diff.c |    7 +++++++\n 1 files changed, 7 insertions(+), 0 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex 7d17754..a49c36a 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -20,6 +20,7 @@\n static int diff_detect_rename_default;\n static int diff_rename_limit_default = 100;\n static int diff_use_color_default;\n+static const char *external_diff_cmd_cfg;\n int diff_auto_refresh_index = 1;\n \n static char diff_colors[][COLOR_MAXLEN] = {\n@@ -163,6 +164,10 @@ int git_diff_ui_config(const char *var, const char *value)\n \t\tdiff_auto_refresh_index = git_config_bool(var, value);\n \t\treturn 0;\n \t}\n+\tif (!strcmp(var, \"diff.external\")) {\n+\t\texternal_diff_cmd_cfg = xstrdup(value);\n+\t\treturn 0;\n+\t}\n \tif (!prefixcmp(var, \"diff.\")) {\n \t\tconst char *ep = strrchr(var, '.');\n \n@@ -209,6 +214,8 @@ static const char *external_diff(void)\n \tif (done_preparing)\n \t\treturn external_diff_cmd;\n \texternal_diff_cmd = getenv(\"GIT_EXTERNAL_DIFF\");\n+\tif (!external_diff_cmd)\n+\t\texternal_diff_cmd = external_diff_cmd_cfg;\n \tdone_preparing = 1;\n \treturn external_diff_cmd;\n }\n-- \n1.5.4.rc0.59.g1d10d\n"},{"id":"63530","messageId":"7vtzmg5072.fsf@gitster.siamese.dyndns.org","threadId":"11319","inReplyTo":"Pine.LNX.4.64.0712171220540.9446@racer.site","subject":"Re: [PATCH] Document diff.external and mergetool.<tool>.path","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-18T00:13:53Z","receivedAt":"2007-12-18T00:13:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.  Applied.\n"},{"id":"63535","messageId":"Pine.LNX.4.64.0712180047300.9446@racer.site","threadId":"11319","inReplyTo":"7vtzmg5072.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Document diff.external and mergetool.<tool>.path","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-12-18T00:47:47Z","receivedAt":"2007-12-18T00:47:47Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 17 Dec 2007, Junio C Hamano wrote:\n\n> Thanks.  Applied.\n\nDumb question: with, or without, the diff.external patch?\n\nCiao,\nDscho\n"},{"id":"63538","messageId":"7vy7bs3jv2.fsf@gitster.siamese.dyndns.org","threadId":"11319","inReplyTo":"Pine.LNX.4.64.0712180047300.9446@racer.site","subject":"Re: [PATCH] Document diff.external and mergetool.<tool>.path","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-18T00:52:01Z","receivedAt":"2007-12-18T00:52:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Mon, 17 Dec 2007, Junio C Hamano wrote:\n>\n>> Thanks.  Applied.\n>\n> Dumb question: with, or without, the diff.external patch?\n\nSwapped the order to first make diff.external work and then document.\n"},{"id":"63539","messageId":"Pine.LNX.4.64.0712180100480.9446@racer.site","threadId":"11319","inReplyTo":"7vy7bs3jv2.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Document diff.external and mergetool.<tool>.path","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-12-18T01:00:58Z","receivedAt":"2007-12-18T01:00:58Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 17 Dec 2007, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > On Mon, 17 Dec 2007, Junio C Hamano wrote:\n> >\n> >> Thanks.  Applied.\n> >\n> > Dumb question: with, or without, the diff.external patch?\n> \n> Swapped the order to first make diff.external work and then document.\n\nThank you very much!\n\nCiao,\nDscho\n"}]}