blob: 4da9d240962f24da7daa7ebde7b4f0db4634cdd8 [file] [log] [blame]
Junio C Hamano2db3e752010-09-03 21:33:061git-mergetool{litdd}lib(1)
2==========================
Junio C Hamano3bd66e92009-04-18 06:17:563
4NAME
5----
Junio C Hamano076ffcc2013-02-06 05:13:216git-mergetool--lib - Common Git merge tool shell scriptlets
Junio C Hamano3bd66e92009-04-18 06:17:567
8SYNOPSIS
9--------
Junio C Hamano15567bc2011-07-23 00:51:5910[verse]
Junio C Hamano360e3a12011-07-13 23:51:5611'TOOL_MODE=(diff|merge) . "$(git --exec-path)/git-mergetool{litdd}lib"'
Junio C Hamano3bd66e92009-04-18 06:17:5612
13DESCRIPTION
14-----------
15
16This is not a command the end user would want to run. Ever.
17This documentation is meant for people who are studying the
18Porcelain-ish scripts and/or are writing new ones.
19
Junio C Hamano2db3e752010-09-03 21:33:0620The 'git-mergetool{litdd}lib' scriptlet is designed to be sourced (using
Junio C Hamano3bd66e92009-04-18 06:17:5621`.`) by other shell scripts to set up functions for working
Junio C Hamano076ffcc2013-02-06 05:13:2122with Git merge tools.
Junio C Hamano3bd66e92009-04-18 06:17:5623
Junio C Hamano2db3e752010-09-03 21:33:0624Before sourcing 'git-mergetool{litdd}lib', your script must set `TOOL_MODE`
Junio C Hamano3bd66e92009-04-18 06:17:5625to define the operation mode for the functions listed below.
26'diff' and 'merge' are valid values.
27
28FUNCTIONS
29---------
30get_merge_tool::
Junio C Hamano56d696e2019-05-19 09:01:1931returns a merge tool. the return code is 1 if we returned a guessed
32merge tool, else 0. '$GIT_MERGETOOL_GUI' may be set to 'true' to
33search for the appropriate guitool.
Junio C Hamano3bd66e92009-04-18 06:17:5634
35get_merge_tool_cmd::
36returns the custom command for a merge tool.
37
38get_merge_tool_path::
39returns the custom path for a merge tool.
40
41run_merge_tool::
42launches a merge tool given the tool name and a true/false
43flag to indicate whether a merge base is present.
44'$MERGED', '$LOCAL', '$REMOTE', and '$BASE' must be defined
45for use by the merge tool.
46
Junio C Hamano3bd66e92009-04-18 06:17:5647GIT
48---
49Part of the linkgit:git[1] suite