Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 1 | git-mergetool{litdd}lib(1) |
| 2 | ========================== |
Junio C Hamano | 3bd66e9 | 2009-04-18 06:17:56 | [diff] [blame] | 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 6 | git-mergetool--lib - Common Git merge tool shell scriptlets |
Junio C Hamano | 3bd66e9 | 2009-04-18 06:17:56 | [diff] [blame] | 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 10 | [verse] |
Junio C Hamano | 360e3a1 | 2011-07-13 23:51:56 | [diff] [blame] | 11 | 'TOOL_MODE=(diff|merge) . "$(git --exec-path)/git-mergetool{litdd}lib"' |
Junio C Hamano | 3bd66e9 | 2009-04-18 06:17:56 | [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 | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 20 | The 'git-mergetool{litdd}lib' scriptlet is designed to be sourced (using |
Junio C Hamano | 3bd66e9 | 2009-04-18 06:17:56 | [diff] [blame] | 21 | `.`) by other shell scripts to set up functions for working |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 22 | with Git merge tools. |
Junio C Hamano | 3bd66e9 | 2009-04-18 06:17:56 | [diff] [blame] | 23 | |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 24 | Before sourcing 'git-mergetool{litdd}lib', your script must set `TOOL_MODE` |
Junio C Hamano | 3bd66e9 | 2009-04-18 06:17:56 | [diff] [blame] | 25 | to define the operation mode for the functions listed below. |
| 26 | 'diff' and 'merge' are valid values. |
| 27 | |
| 28 | FUNCTIONS |
| 29 | --------- |
| 30 | get_merge_tool:: |
Junio C Hamano | 56d696e | 2019-05-19 09:01:19 | [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. |
Junio C Hamano | 3bd66e9 | 2009-04-18 06:17:56 | [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 | |
| 41 | run_merge_tool:: |
| 42 | launches a merge tool given the tool name and a true/false |
| 43 | flag to indicate whether a merge base is present. |
| 44 | '$MERGED', '$LOCAL', '$REMOTE', and '$BASE' must be defined |
| 45 | for use by the merge tool. |
| 46 | |
Junio C Hamano | 3bd66e9 | 2009-04-18 06:17:56 | [diff] [blame] | 47 | GIT |
| 48 | --- |
| 49 | Part of the linkgit:git[1] suite |