{"thread":{"id":"12581","subject":"[PATCH 1/2] Follow the more popular highlighting convention in git-mergetool doc","startedAt":"2008-03-08T20:46:34Z","lastAt":"2008-03-08T20:47:06Z","messageCount":2,"participants":["Charles Bailey"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"71438","messageId":"b4c3c2a6ee8fbc73d9c4f4582cc9c4ae6e58b15e.1205008859.git.charles@hashpling.org","threadId":"12581","inReplyTo":null,"subject":"[PATCH 1/2] Follow the more popular highlighting convention in git-mergetool doc","fromName":"Charles Bailey","fromEmail":"charles@hashpling.org","sentAt":"2008-03-08T20:46:34Z","receivedAt":"2008-03-08T20:46:34Z","isPatch":true,"sender":{"key":"charles@hashpling.org","avatar":"https://avatars.githubusercontent.com/u/1668475?v=4"},"body":"Signed-off-by: Charles Bailey <charles@hashpling.org>\n---\n\nI've just noticed that the only documentation for the new mergetool\nfunctionality is hidden in 'git help config' which is a little obscure.\nThese two patches rectify this by adding documentation to 'git help\nmergetool'.\n\nI've also switched some quotes to backticks to follow what seems to be\nthe more popular quoting convention in the git documentation, but as I'm\nnot an expert in how the docs work in all format perhaps someone can\ncorrect me and I can update the patch.\n\n Documentation/git-mergetool.txt |   16 ++++++++--------\n 1 files changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt\nindex 50f106e..ac8969c 100644\n--- a/Documentation/git-mergetool.txt\n+++ b/Documentation/git-mergetool.txt\n@@ -12,12 +12,12 @@ SYNOPSIS\n DESCRIPTION\n -----------\n \n-Use 'git mergetool' to run one of several merge utilities to resolve\n+Use `git mergetool` to run one of several merge utilities to resolve\n merge conflicts.  It is typically run after linkgit:git-merge[1].\n \n If one or more <file> parameters are given, the merge tool program will\n be run to resolve differences on each file.  If no <file> names are\n-specified, 'git mergetool' will run the merge tool program on every file\n+specified, `git mergetool` will run the merge tool program on every file\n with merge conflicts.\n \n OPTIONS\n@@ -27,16 +27,16 @@ OPTIONS\n \tValid merge tools are:\n \tkdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff\n +\n-If a merge resolution program is not specified, 'git mergetool'\n-will use the configuration variable merge.tool.  If the\n-configuration variable merge.tool is not set, 'git mergetool'\n+If a merge resolution program is not specified, `git mergetool`\n+will use the configuration variable `merge.tool`.  If the\n+configuration variable `merge.tool` is not set, `git mergetool`\n will pick a suitable default.\n +\n You can explicitly provide a full path to the tool by setting the\n-configuration variable mergetool.<tool>.path. For example, you\n+configuration variable `mergetool.<tool>.path`. For example, you\n can configure the absolute path to kdiff3 by setting\n-mergetool.kdiff3.path. Otherwise, 'git mergetool' assumes the tool\n-is available in PATH.\n+`mergetool.kdiff3.path`. Otherwise, `git mergetool` assumes the\n+tool is available in PATH.\n \n Author\n ------\n-- \n1.5.4.3.432.g5ecfc\n\n"},{"id":"71439","messageId":"c869f1c4783c79dabb1fc3a9d19df64e08acbf8c.1205008859.git.charles@hashpling.org","threadId":"12581","inReplyTo":"b4c3c2a6ee8fbc73d9c4f4582cc9c4ae6e58b15e.1205008859.git.charles@hashpling.org","subject":"[PATCH 2/2] Added documentation for custom merge tool functionality","fromName":"Charles Bailey","fromEmail":"charles@hashpling.org","sentAt":"2008-03-08T20:47:06Z","receivedAt":"2008-03-08T20:47:06Z","isPatch":true,"sender":{"key":"charles@hashpling.org","avatar":"https://avatars.githubusercontent.com/u/1668475?v=4"},"body":"Up until now, the configuration variables for custom merge tools were\ndocumented in config.txt but there was no reference to the functionality\nin git-mergetool.txt.\n\nSigned-off-by: Charles Bailey <charles@hashpling.org>\n---\n Documentation/git-mergetool.txt |   24 +++++++++++++++++++++++-\n 1 files changed, 23 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt\nindex ac8969c..1af401c 100644\n--- a/Documentation/git-mergetool.txt\n+++ b/Documentation/git-mergetool.txt\n@@ -24,7 +24,7 @@ OPTIONS\n -------\n -t or --tool=<tool>::\n \tUse the merge resolution program specified by <tool>.\n-\tValid merge tools are:\n+\tValid built-in merge tools are:\n \tkdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff\n +\n If a merge resolution program is not specified, `git mergetool`\n@@ -37,6 +37,28 @@ configuration variable `mergetool.<tool>.path`. For example, you\n can configure the absolute path to kdiff3 by setting\n `mergetool.kdiff3.path`. Otherwise, `git mergetool` assumes the\n tool is available in PATH.\n++\n+As an alternative to running one of the known merge tool programs\n+`git mergetool` can be customized to run an alternative program\n+by specifying the command line to invoke in a configration\n+variable `mergetool.<tool>.cmd`.\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+set to the name of a temporary file containing the common base for\n+the merge, if available; `$LOCAL` set to the name of a temporary\n+file containing the contents of the file on the current branch;\n+`$REMOTE` set to the name of a temporary file containing the\n+contents of the file to be merged, and `$MERGED` set to the name\n+of the file to which the merge tool should write the result of the\n+merge resolution.\n++\n+If the custom merge tool correctly indicates the success of a\n+merge resolution with its exit code then the configuration\n+variable `mergetool.<tool>.trustExitCode` can be set to `true`.\n+Otherwise, `git mergetool` will prompt the user to indicate the\n+success of the resolution after the custom tool has exited.\n \n Author\n ------\n-- \n1.5.4.3.432.g5ecfc\n\n"}]}