man-pages/man1/git-mergetool--lib.1.html
2021-03-31 01:06:50 +01:00

114 lines
2.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of GIT-MERGETOOL--LI</TITLE>
</HEAD><BODY>
<H1>GIT-MERGETOOL--LI</H1>
Section: Git Manual (1)<BR>Updated: 03/04/2021<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
git-mergetool--lib - Common Git merge tool shell scriptlets
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<PRE>
<I>TOOL_MODE=(diff|merge) . &quot;$(git --exec-path)/git-mergetool--lib&quot;</I>
</PRE>
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
This is not a command the end user would want to run. Ever. This documentation is meant for people who are studying the Porcelain-ish scripts and/or are writing new ones.
<P>
The <I>git-mergetool--lib</I> scriptlet is designed to be sourced (using <B>.</B>) by other shell scripts to set up functions for working with Git merge tools.
<P>
Before sourcing <I>git-mergetool--lib</I>, your script must set <B>TOOL_MODE</B> to define the operation mode for the functions listed below. <I>diff</I> and <I>merge</I> are valid values.
<A NAME="lbAE">&nbsp;</A>
<H2>FUNCTIONS</H2>
<P>
get_merge_tool
<DL COMPACT><DT id="1"><DD>
returns a merge tool. the return code is 1 if we returned a guessed merge tool, else 0.
<I>$GIT_MERGETOOL_GUI</I>
may be set to
<I>true</I>
to search for the appropriate guitool.
</DL>
<P>
get_merge_tool_cmd
<DL COMPACT><DT id="2"><DD>
returns the custom command for a merge tool.
</DL>
<P>
get_merge_tool_path
<DL COMPACT><DT id="3"><DD>
returns the custom path for a merge tool.
</DL>
<P>
run_merge_tool
<DL COMPACT><DT id="4"><DD>
launches a merge tool given the tool name and a true/false flag to indicate whether a merge base is present.
<I>$MERGED</I>,
<I>$LOCAL</I>,
<I>$REMOTE</I>, and
<I>$BASE</I>
must be defined for use by the merge tool.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>GIT</H2>
<P>
Part of the <B><A HREF="/cgi-bin/man/man2html?1+git">git</A></B>(1) suite
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="5"><A HREF="#lbAB">NAME</A><DD>
<DT id="6"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="7"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="8"><A HREF="#lbAE">FUNCTIONS</A><DD>
<DT id="9"><A HREF="#lbAF">GIT</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:14 GMT, March 31, 2021
</BODY>
</HTML>