1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
\r
4 <article lang="en" id="git-mergetool--lib(1)">
\r
6 <title>git-mergetool--lib(1)</title>
\r
8 <primary>git-mergetool--lib(1)</primary>
\r
11 <simplesect id="_name">
\r
13 <simpara>git-mergetool--lib - Common git merge tool shell scriptlets</simpara>
\r
15 <simplesect id="_synopsis">
\r
16 <title>SYNOPSIS</title>
\r
18 <literallayout><emphasis>TOOL_MODE=(diff|merge) . "$(git --exec-path)/git-mergetool--lib"</emphasis></literallayout>
\r
21 <simplesect id="_description">
\r
22 <title>DESCRIPTION</title>
\r
23 <simpara>This is not a command the end user would want to run. Ever.
\r
24 This documentation is meant for people who are studying the
\r
25 Porcelain-ish scripts and/or are writing new ones.</simpara>
\r
26 <simpara>The <emphasis>git-mergetool--lib</emphasis> scriptlet is designed to be sourced (using
\r
27 <emphasis>.</emphasis>) by other shell scripts to set up functions for working
\r
28 with git merge tools.</simpara>
\r
29 <simpara>Before sourcing <emphasis>git-mergetool--lib</emphasis>, your script must set <emphasis>TOOL_MODE</emphasis>
\r
30 to define the operation mode for the functions listed below.
\r
31 <emphasis>diff</emphasis> and <emphasis>merge</emphasis> are valid values.</simpara>
\r
33 <simplesect id="_functions">
\r
34 <title>FUNCTIONS</title>
\r
42 returns a merge tool.
\r
52 returns the custom command for a merge tool.
\r
62 returns the custom path for a merge tool.
\r
72 launches a merge tool given the tool name and a true/false
\r
73 flag to indicate whether a merge base is present.
\r
74 <emphasis>$MERGED</emphasis>, <emphasis>$LOCAL</emphasis>, <emphasis>$REMOTE</emphasis>, and <emphasis>$BASE</emphasis> must be defined
\r
75 for use by the merge tool.
\r
81 <simplesect id="_git">
\r
83 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
\r