blob: 055550b2bcc805780396b83b162a328230c0a1c6 [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::
31returns a merge tool.
32
33get_merge_tool_cmd::
34returns the custom command for a merge tool.
35
36get_merge_tool_path::
37returns the custom path for a merge tool.
38
39run_merge_tool::
40launches a merge tool given the tool name and a true/false
41flag to indicate whether a merge base is present.
42'$MERGED', '$LOCAL', '$REMOTE', and '$BASE' must be defined
43for use by the merge tool.
44
Junio C Hamano3bd66e92009-04-18 06:17:5645GIT
46---
47Part of the linkgit:git[1] suite