3d57031d78d9e274890ab2264adcbc95980646d0
1 git-mergetool--lib(1)
2 =====================
4 NAME
5 ----
6 git-mergetool--lib - Common git merge tool shell scriptlets
8 SYNOPSIS
9 --------
10 '. "$(git --exec-path)/git-mergetool--lib"'
12 DESCRIPTION
13 -----------
15 This is not a command the end user would want to run. Ever.
16 This documentation is meant for people who are studying the
17 Porcelain-ish scripts and/or are writing new ones.
19 The 'git-mergetool--lib' scriptlet is designed to be sourced (using
20 `.`) by other shell scripts to set up functions for working
21 with git merge tools.
23 Before sourcing it, your script should set up a few variables;
24 `TOOL_MODE` is used to define the operation mode for various
25 functions. 'diff' and 'merge' are valid values.
27 FUNCTIONS
28 ---------
29 get_merge_tool::
30 returns a merge tool
32 get_merge_tool_cmd::
33 returns the custom command for a merge tool.
35 get_merge_tool_path::
36 returns the custom path for a merge tool.
38 run_merge_tool::
39 launches a merge tool given the tool name and a true/false
40 flag to indicate whether a merge base is present.
41 '$merge_tool', '$merge_tool_path', and for custom commands,
42 '$merge_tool_cmd', must be defined prior to calling
43 run_merge_tool. Additionally, '$MERGED', '$LOCAL', '$REMOTE',
44 and '$BASE' must be defined for use by the merge tool.
46 Author
47 ------
48 Written by David Aguilar <davvid@gmail.com>
50 Documentation
51 --------------
52 Documentation by David Aguilar and the git-list <git@vger.kernel.org>.
54 GIT
55 ---
56 Part of the linkgit:git[1] suite