{
    "content": [
        {
            "type": "text",
            "text": "# git-mergetool--lib (man)\n\n## NAME\n\ngit-mergetool--lib - Common Git merge tool shell scriptlets\n\n## SYNOPSIS\n\nTOOLMODE=(diff|merge) . \"$(git --exec-path)/git-mergetool--lib\"\n\n## DESCRIPTION\n\nThis is not a command the end user would want to run. Ever. This documentation is meant for\npeople who are studying the Porcelain-ish scripts and/or are writing new ones.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **FUNCTIONS**\n- **GIT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "git-mergetool--lib",
        "section": "",
        "mode": "man",
        "summary": "git-mergetool--lib - Common Git merge tool shell scriptlets",
        "synopsis": "TOOLMODE=(diff|merge) . \"$(git --exec-path)/git-mergetool--lib\"",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 18,
                "subsections": []
            },
            {
                "name": "GIT",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "git-mergetool--lib - Common Git merge tool shell scriptlets\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "TOOLMODE=(diff|merge) . \"$(git --exec-path)/git-mergetool--lib\"\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This is not a command the end user would want to run. Ever. This documentation is meant for\npeople who are studying the Porcelain-ish scripts and/or are writing new ones.\n\nThe git-mergetool--lib scriptlet is designed to be sourced (using .) by other shell scripts\nto set up functions for working with Git merge tools.\n\nBefore sourcing git-mergetool--lib, your script must set TOOLMODE to define the operation\nmode for the functions listed below. diff and merge are valid values.\n",
                "subsections": []
            },
            "FUNCTIONS": {
                "content": "getmergetool\nreturns a merge tool. the return code is 1 if we returned a guessed merge tool, else 0.\n$GITMERGETOOLGUI may be set to true to search for the appropriate guitool.\n\ngetmergetoolcmd\nreturns the custom command for a merge tool.\n\ngetmergetoolpath\nreturns the custom path for a merge tool.\n\ninitializemergetool\nbring merge tool specific functions into scope so they can be used or overridden.\n\nrunmergetool\nlaunches a merge tool given the tool name and a true/false flag to indicate whether a\nmerge base is present.  $MERGED, $LOCAL, $REMOTE, and $BASE must be defined for use by\nthe merge tool.\n",
                "subsections": []
            },
            "GIT": {
                "content": "Part of the git(1) suite\n\n\n\nGit 2.34.1                                   02/26/2026                         GIT-MERGETOOL--LI(1)",
                "subsections": []
            }
        }
    }
}