Junio C Hamano | 2839478 | 2010-08-23 14:20:25 -0700 | [diff] [blame] | 1 | git-mergetool{litdd}lib(1) |
| 2 | ========================== |
David Aguilar | 21d0ba7 | 2009-04-08 00:17:20 -0700 | [diff] [blame] | 3 | |
| 4 | NAME |
| 5 | ---- |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 6 | git-mergetool--lib - Common Git merge tool shell scriptlets |
David Aguilar | 21d0ba7 | 2009-04-08 00:17:20 -0700 | [diff] [blame] | 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
Martin von Zweigbergk | 7791a1d | 2011-07-01 22:38:26 -0400 | [diff] [blame] | 10 | [verse] |
Jonathan Nieder | 565e135 | 2011-06-29 00:35:10 -0500 | [diff] [blame] | 11 | 'TOOL_MODE=(diff|merge) . "$(git --exec-path)/git-mergetool{litdd}lib"' |
David Aguilar | 21d0ba7 | 2009-04-08 00:17:20 -0700 | [diff] [blame] | 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
| 15 | |
| 16 | This is not a command the end user would want to run. Ever. |
| 17 | This documentation is meant for people who are studying the |
| 18 | Porcelain-ish scripts and/or are writing new ones. |
| 19 | |
Junio C Hamano | 2839478 | 2010-08-23 14:20:25 -0700 | [diff] [blame] | 20 | The 'git-mergetool{litdd}lib' scriptlet is designed to be sourced (using |
David Aguilar | 21d0ba7 | 2009-04-08 00:17:20 -0700 | [diff] [blame] | 21 | `.`) by other shell scripts to set up functions for working |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 22 | with Git merge tools. |
David Aguilar | 21d0ba7 | 2009-04-08 00:17:20 -0700 | [diff] [blame] | 23 | |
Junio C Hamano | 2839478 | 2010-08-23 14:20:25 -0700 | [diff] [blame] | 24 | Before sourcing 'git-mergetool{litdd}lib', your script must set `TOOL_MODE` |
David Aguilar | 47d6592 | 2009-04-11 20:41:56 -0700 | [diff] [blame] | 25 | to define the operation mode for the functions listed below. |
| 26 | 'diff' and 'merge' are valid values. |
David Aguilar | 21d0ba7 | 2009-04-08 00:17:20 -0700 | [diff] [blame] | 27 | |
| 28 | FUNCTIONS |
| 29 | --------- |
| 30 | get_merge_tool:: |
Denton Liu | 05fb872 | 2019-04-29 02:21:08 -0400 | [diff] [blame] | 31 | returns a merge tool. the return code is 1 if we returned a guessed |
| 32 | merge tool, else 0. '$GIT_MERGETOOL_GUI' may be set to 'true' to |
| 33 | search for the appropriate guitool. |
David Aguilar | 21d0ba7 | 2009-04-08 00:17:20 -0700 | [diff] [blame] | 34 | |
| 35 | get_merge_tool_cmd:: |
| 36 | returns the custom command for a merge tool. |
| 37 | |
| 38 | get_merge_tool_path:: |
| 39 | returns the custom path for a merge tool. |
| 40 | |
Seth House | de8dafb | 2021-02-09 13:07:11 -0700 | [diff] [blame] | 41 | initialize_merge_tool:: |
| 42 | bring merge tool specific functions into scope so they can be used or |
| 43 | overridden. |
| 44 | |
David Aguilar | 21d0ba7 | 2009-04-08 00:17:20 -0700 | [diff] [blame] | 45 | run_merge_tool:: |
| 46 | launches a merge tool given the tool name and a true/false |
| 47 | flag to indicate whether a merge base is present. |
David Aguilar | 47d6592 | 2009-04-11 20:41:56 -0700 | [diff] [blame] | 48 | '$MERGED', '$LOCAL', '$REMOTE', and '$BASE' must be defined |
| 49 | for use by the merge tool. |
David Aguilar | 21d0ba7 | 2009-04-08 00:17:20 -0700 | [diff] [blame] | 50 | |
David Aguilar | 21d0ba7 | 2009-04-08 00:17:20 -0700 | [diff] [blame] | 51 | GIT |
| 52 | --- |
| 53 | Part of the linkgit:git[1] suite |