2010-08-23 21:20:25 +00:00
|
|
|
git-mergetool{litdd}lib(1)
|
|
|
|
==========================
|
2009-04-08 07:17:20 +00:00
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2013-01-21 19:17:53 +00:00
|
|
|
git-mergetool--lib - Common Git merge tool shell scriptlets
|
2009-04-08 07:17:20 +00:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2011-07-02 02:38:26 +00:00
|
|
|
[verse]
|
Documentation: quote double-dash for AsciiDoc
AsciiDoc versions since 5.0.6 treat a double-dash surrounded by spaces
(outside of verbatim environments) as a request to insert an em dash.
Such versions also treat the three-character sequence "\--", when not
followed by another dash, as a request to insert two literal minus
signs. Thus from time to time there have been patches to add
backslashes to AsciiDoc markup to escape double-dashes that are meant
to be represent '--' characters used literally on the command line;
see v1.4.0-rc1~174, Fix up docs where "--" isn't displayed correctly,
2006-05-05, for example.
AsciiDoc 6.0.3 (2005-04-20) made life harder by also treating
double-dashes without surrounding whitespace as markup for an em dash,
though only when formatting for backends other than the manpages
(e.g., HTML). Many pages needed to be changed to use a backslash
before the "--" in names of command-line flags like "--add" (see
v0.99.6~37, Update tutorial, 2005-08-30).
AsciiDoc 8.3.0 (2008-11-29) refined the em-dash rule to avoid that
requirement. Double-dashes without surrounding spaces are not
rendered as em dashes any more unless bordered on both sides by
alphanumeric characters. The unescaped markup for option names (e.g.,
"--add") works fine, and many instances of this style have leaked into
Documentation/; git's HTML documentation contains many spurious em
dashes when formatted by an older toolchain. (This patch will not
change that.)
The upshot: "--" as an isolated word and in phrases like "git
web--browse" must be escaped if it is not to be rendered as an em dash
by current asciidoc. Use "\--" to avoid such misformatting in
sentences in which "--" represents a literal double-minus command line
argument that separates options and revs from pathspecs, and use
"{litdd}" in cases where the double-dash is embedded in the command
name. The latter is just for consistency with v1.7.3-rc0~13^2 (Work
around em-dash handling in newer AsciiDoc, 2010-08-23).
List of lines to fix found by grepping manpages for "(em".
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Improved-by: Junio C Hamano <gitster@pobox.com>
Improved-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-29 05:35:10 +00:00
|
|
|
'TOOL_MODE=(diff|merge) . "$(git --exec-path)/git-mergetool{litdd}lib"'
|
2009-04-08 07:17:20 +00:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
2010-08-23 21:20:25 +00:00
|
|
|
The 'git-mergetool{litdd}lib' scriptlet is designed to be sourced (using
|
2009-04-08 07:17:20 +00:00
|
|
|
`.`) by other shell scripts to set up functions for working
|
2013-01-21 19:17:53 +00:00
|
|
|
with Git merge tools.
|
2009-04-08 07:17:20 +00:00
|
|
|
|
2010-08-23 21:20:25 +00:00
|
|
|
Before sourcing 'git-mergetool{litdd}lib', your script must set `TOOL_MODE`
|
2009-04-12 03:41:56 +00:00
|
|
|
to define the operation mode for the functions listed below.
|
|
|
|
'diff' and 'merge' are valid values.
|
2009-04-08 07:17:20 +00:00
|
|
|
|
|
|
|
FUNCTIONS
|
|
|
|
---------
|
|
|
|
get_merge_tool::
|
2019-04-29 06:21:08 +00:00
|
|
|
returns a merge tool. the return code is 1 if we returned a guessed
|
|
|
|
merge tool, else 0. '$GIT_MERGETOOL_GUI' may be set to 'true' to
|
|
|
|
search for the appropriate guitool.
|
2009-04-08 07:17:20 +00:00
|
|
|
|
|
|
|
get_merge_tool_cmd::
|
|
|
|
returns the custom command for a merge tool.
|
|
|
|
|
|
|
|
get_merge_tool_path::
|
|
|
|
returns the custom path for a merge tool.
|
|
|
|
|
2021-02-09 20:07:11 +00:00
|
|
|
initialize_merge_tool::
|
|
|
|
bring merge tool specific functions into scope so they can be used or
|
|
|
|
overridden.
|
|
|
|
|
2009-04-08 07:17:20 +00:00
|
|
|
run_merge_tool::
|
|
|
|
launches a merge tool given the tool name and a true/false
|
|
|
|
flag to indicate whether a merge base is present.
|
2009-04-12 03:41:56 +00:00
|
|
|
'$MERGED', '$LOCAL', '$REMOTE', and '$BASE' must be defined
|
|
|
|
for use by the merge tool.
|
2009-04-08 07:17:20 +00:00
|
|
|
|
|
|
|
GIT
|
|
|
|
---
|
|
|
|
Part of the linkgit:git[1] suite
|