| 1 | git-mergetool{litdd}lib(1) |
| 2 | ========================== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | git-mergetool--lib - Common Git merge tool shell scriptlets |
| 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
| 10 | [verse] |
| 11 | 'TOOL_MODE=(diff|merge) . "$(git --exec-path)/git-mergetool{litdd}lib"' |
| 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 | |
| 20 | The 'git-mergetool{litdd}lib' scriptlet is designed to be sourced (using |
| 21 | `.`) by other shell scripts to set up functions for working |
| 22 | with Git merge tools. |
| 23 | |
| 24 | Before sourcing 'git-mergetool{litdd}lib', your script must set `TOOL_MODE` |
| 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:: |
| 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. |
| 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 | initialize_merge_tool:: |
| 42 | Brings merge tool specific functions into scope so they can be used or |
| 43 | overridden. |
| 44 | |
| 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. |
| 48 | '$MERGED', '$LOCAL', '$REMOTE', and '$BASE' must be defined |
| 49 | for use by the merge tool. |
| 50 | |
| 51 | GIT |
| 52 | --- |
| 53 | Part of the linkgit:git[1] suite |