<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect2 SYSTEM "../../../dtd/dblite.dtd">

<sect2 lang="en" id="git-mktree(1)">
    <title>git-mktree(1)</title>
    <date>2024-07-02</date>
<revhistory><revision><date>2024-07-02</date></revision></revhistory>
<indexterm>
<primary>git-mktree(1)</primary>
</indexterm>
<simplesect id="git-mktree(1)__name">
<title>NAME</title>
<simpara>git-mktree - Build a tree-object from ls-tree formatted text</simpara>
</simplesect>
<simplesect id="git-mktree(1)__synopsis">
<title>SYNOPSIS</title>
<blockquote>
<literallayout><emphasis>git mktree</emphasis> [-z] [--missing] [--batch]</literallayout>
</blockquote>
</simplesect>
<simplesect id="git-mktree(1)__description">
<title>DESCRIPTION</title>
<simpara>Reads standard input in non-recursive <emphasis>ls-tree</emphasis> output format, and creates
a tree object.  The order of the tree entries is normalized by mktree so
pre-sorting the input is not required.  The object name of the tree object
built is written to the standard output.</simpara>
</simplesect>
<simplesect id="git-mktree(1)__options">
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term>
-z
</term>
<listitem>
<simpara>
        Read the NUL-terminated <emphasis>ls-tree -z</emphasis> output instead.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--missing
</term>
<listitem>
<simpara>
        Allow missing objects.  The default behaviour (without this option)
        is to verify that each tree entry's hash identifies an existing
        object.  This option has no effect on the treatment of gitlink entries
        (aka "submodules") which are always allowed to be missing.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--batch
</term>
<listitem>
<simpara>
        Allow building of more than one tree object before exiting.  Each
        tree is separated by a single blank line. The final newline is
        optional.  Note - if the <emphasis>-z</emphasis> option is used, lines are terminated
        with NUL.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
<simplesect id="git-mktree(1)__git">
<title>GIT</title>
<simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
</simplesect>
</sect2>
