summaryrefslogtreecommitdiffstats
path: root/man1/git-mergetool--lib.1
blob: d51a416854f98637a1e03cac80177e3da9fe2bee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
'\" t
.\"     Title: git-mergetool--lib
.\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 2024-04-12
.\"    Manual: Git Manual
.\"    Source: Git 2.44.0.591.g8f7582d995
.\"  Language: English
.\"
.TH "GIT\-MERGETOOL\-\-LIB" "1" "2024\-04\-12" "Git 2\&.44\&.0\&.591\&.g8f7582" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-mergetool--lib \- Common Git merge tool shell scriptlets
.SH "SYNOPSIS"
.sp
.nf
\fITOOL_MODE=(diff|merge) \&. "$(git \-\-exec\-path)/git\-mergetool\-\-lib"\fR
.fi
.sp
.SH "DESCRIPTION"
.sp
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\&.
.sp
The \fIgit\-mergetool\-\-lib\fR scriptlet is designed to be sourced (using \fB\&.\fR) by other shell scripts to set up functions for working with Git merge tools\&.
.sp
Before sourcing \fIgit\-mergetool\-\-lib\fR, your script must set \fBTOOL_MODE\fR to define the operation mode for the functions listed below\&. \fIdiff\fR and \fImerge\fR are valid values\&.
.SH "FUNCTIONS"
.PP
get_merge_tool
.RS 4
Returns a merge tool\&. The return code is 1 if we returned a guessed merge tool, else 0\&.
\fI$GIT_MERGETOOL_GUI\fR
may be set to
\fItrue\fR
to search for the appropriate guitool\&.
.RE
.PP
get_merge_tool_cmd
.RS 4
Returns the custom command for a merge tool\&.
.RE
.PP
get_merge_tool_path
.RS 4
Returns the custom path for a merge tool\&.
.RE
.PP
initialize_merge_tool
.RS 4
Brings merge tool specific functions into scope so they can be used or overridden\&.
.RE
.PP
run_merge_tool
.RS 4
Launches a merge tool given the tool name and a true/false flag to indicate whether a merge base is present\&.
\fI$MERGED\fR,
\fI$LOCAL\fR,
\fI$REMOTE\fR, and
\fI$BASE\fR
must be defined for use by the merge tool\&.
.RE
.SH "GIT"
.sp
Part of the \fBgit\fR(1) suite