{
    "content": [
        {
            "type": "text",
            "text": "# git-mktree(1) (man)\n\n**Summary:** git-mktree - Build a tree-object from ls-tree formatted text\n\n**Synopsis:** git mktree [-z] [--missing] [--batch]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -z | — | — | Read the NUL-terminated ls-tree -z output instead. |\n| — | --missing | — | Allow missing objects. The default behaviour (without this option) is to verify that each tree entry’s sha1 identifies a |\n| — | --batch | — | Allow building of more than one tree object before exiting. Each tree is separated by as single blank line. The final ne |\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (3 lines)\n- **DESCRIPTION** (4 lines)\n- **OPTIONS** (1 lines) — 3 subsections\n  - -z (2 lines)\n  - --missing (4 lines)\n  - --batch (4 lines)\n- **GIT** (5 lines)\n\n## Full Content\n\n### NAME\n\ngit-mktree - Build a tree-object from ls-tree formatted text\n\n### SYNOPSIS\n\ngit mktree [-z] [--missing] [--batch]\n\n### DESCRIPTION\n\nReads standard input in non-recursive ls-tree output format, and creates a tree object. The\norder of the tree entries is normalized by mktree so pre-sorting the input is not required.\nThe object name of the tree object built is written to the standard output.\n\n### OPTIONS\n\n#### -z\n\nRead the NUL-terminated ls-tree -z output instead.\n\n#### --missing\n\nAllow missing objects. The default behaviour (without this option) is to verify that each\ntree entry’s sha1 identifies an existing object. This option has no effect on the\ntreatment of gitlink entries (aka \"submodules\") which are always allowed to be missing.\n\n#### --batch\n\nAllow building of more than one tree object before exiting. Each tree is separated by as\nsingle blank line. The final new-line is optional. Note - if the -z option is used, lines\nare terminated with NUL.\n\n### GIT\n\nPart of the git(1) suite\n\n\n\nGit 2.34.1                                   02/26/2026                                GIT-MKTREE(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "git-mktree",
        "section": "1",
        "mode": "man",
        "summary": "git-mktree - Build a tree-object from ls-tree formatted text",
        "synopsis": "git mktree [-z] [--missing] [--batch]",
        "flags": [
            {
                "flag": "-z",
                "long": null,
                "arg": null,
                "description": "Read the NUL-terminated ls-tree -z output instead."
            },
            {
                "flag": "",
                "long": "--missing",
                "arg": null,
                "description": "Allow missing objects. The default behaviour (without this option) is to verify that each tree entry’s sha1 identifies an existing object. This option has no effect on the treatment of gitlink entries (aka \"submodules\") which are always allowed to be missing."
            },
            {
                "flag": "",
                "long": "--batch",
                "arg": null,
                "description": "Allow building of more than one tree object before exiting. Each tree is separated by as single blank line. The final new-line is optional. Note - if the -z option is used, lines are terminated with NUL."
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-z",
                        "lines": 2,
                        "flag": "-z"
                    },
                    {
                        "name": "--missing",
                        "lines": 4,
                        "long": "--missing"
                    },
                    {
                        "name": "--batch",
                        "lines": 4,
                        "long": "--batch"
                    }
                ]
            },
            {
                "name": "GIT",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}