@matheusbsbs / matheus-bagliano / commits / caa99829a2
Fork 0

merge-tool documentation: describe custom command usage

The configuration variables for custom merge tools were documented only in config.txt but there was no reference to the functionality in git-mergetool.txt. Signed-off-by: Charles Bailey <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Charles Bailey committed Mar 8, 2008 at 20:47 UTC caa99829a24bc4decf86278c3478c88f564a795a
1 file changed +22
Documentation/git-mergetool.txt
+22
@@ -37,6 +37,28 @@ configuration variable `mergetool.<tool>.path`. For example, you
37 can configure the absolute path to kdiff3 by setting
38 `mergetool.kdiff3.path`. Otherwise, `git mergetool` assumes the
39 tool is available in PATH.
40 ++
41 +Instead of running one of the known merge tool programs
42 +`git mergetool` can be customized to run an alternative program
43 +by specifying the command line to invoke in a configration
44 +variable `mergetool.<tool>.cmd`.
45 ++
46 +When `git mergetool` is invoked with this tool (either through the
47 +`-t` or `--tool` option or the `merge.tool` configuration
48 +variable) the configured command line will be invoked with `$BASE`
49 +set to the name of a temporary file containing the common base for
50 +the merge, if available; `$LOCAL` set to the name of a temporary
51 +file containing the contents of the file on the current branch;
52 +`$REMOTE` set to the name of a temporary file containing the
53 +contents of the file to be merged, and `$MERGED` set to the name
54 +of the file to which the merge tool should write the result of the
55 +merge resolution.
56 ++
57 +If the custom merge tool correctly indicates the success of a
58 +merge resolution with its exit code then the configuration
59 +variable `mergetool.<tool>.trustExitCode` can be set to `true`.
60 +Otherwise, `git mergetool` will prompt the user to indicate the
61 +success of the resolution after the custom tool has exited.
62
63 Author
64 ------