]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-mergetool--lib.txt
worktree: fix worktree add race
[thirdparty/git.git] / Documentation / git-mergetool--lib.txt
CommitLineData
28394787
JH
1git-mergetool{litdd}lib(1)
2==========================
21d0ba7e
DA
3
4NAME
5----
2de9b711 6git-mergetool--lib - Common Git merge tool shell scriptlets
21d0ba7e
DA
7
8SYNOPSIS
9--------
7791a1d9 10[verse]
565e135a 11'TOOL_MODE=(diff|merge) . "$(git --exec-path)/git-mergetool{litdd}lib"'
21d0ba7e
DA
12
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
28394787 20The 'git-mergetool{litdd}lib' scriptlet is designed to be sourced (using
21d0ba7e 21`.`) by other shell scripts to set up functions for working
2de9b711 22with Git merge tools.
21d0ba7e 23
28394787 24Before sourcing 'git-mergetool{litdd}lib', your script must set `TOOL_MODE`
47d65924
DA
25to define the operation mode for the functions listed below.
26'diff' and 'merge' are valid values.
21d0ba7e
DA
27
28FUNCTIONS
29---------
30get_merge_tool::
47d65924 31 returns a merge tool.
21d0ba7e
DA
32
33get_merge_tool_cmd::
34 returns the custom command for a merge tool.
35
36get_merge_tool_path::
37 returns the custom path for a merge tool.
38
39run_merge_tool::
40 launches a merge tool given the tool name and a true/false
41 flag to indicate whether a merge base is present.
47d65924
DA
42 '$MERGED', '$LOCAL', '$REMOTE', and '$BASE' must be defined
43 for use by the merge tool.
21d0ba7e 44
21d0ba7e
DA
45GIT
46---
47Part of the linkgit:git[1] suite