From: Josh Micich <josh.micich@gmail.com>
Date: Thu, 14 May 2009 19:46:03 +0000 (-0700)
Subject: mktree --missing: updated usage message and man page
X-Git-Tag: v1.6.4-rc0~99^2~2
X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e01662bb5da721d65226f4b173858ea3bf0bde30

mktree --missing: updated usage message and man page

Update usage message in builtin-mktree.c to include '--missing'.  Do the
same to man page and clarify that the input does not have to be sorted.

Signed-off-by: Josh Micich <josh.micich@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---

diff --git a/Documentation/git-mktree.txt b/Documentation/git-mktree.txt
index af19f06ed7..7336f48bd1 100644
--- a/Documentation/git-mktree.txt
+++ b/Documentation/git-mktree.txt
@@ -8,12 +8,13 @@ git-mktree - Build a tree-object from ls-tree formatted text
 
 SYNOPSIS
 --------
-'git mktree' [-z]
+'git mktree' [-z] [--missing]
 
 DESCRIPTION
 -----------
-Reads standard input in non-recursive `ls-tree` output format,
-and creates a tree object.  The object name of the tree object
+Reads standard input in non-recursive `ls-tree` output format, and creates
+a tree object.  The order of the tree entries is normalised by mktree so
+pre-sorting the input is not required.  The object name of the tree object
 built is written to the standard output.
 
 OPTIONS
@@ -21,6 +22,12 @@ OPTIONS
 -z::
 	Read the NUL-terminated `ls-tree -z` output instead.
 
+--missing::
+	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.
+
 Author
 ------
 Written by Junio C Hamano <gitster@pobox.com>
diff --git a/builtin-mktree.c b/builtin-mktree.c
index e1c9a2701a..5ff04753b7 100644
--- a/builtin-mktree.c
+++ b/builtin-mktree.c
@@ -63,7 +63,7 @@ static void write_tree(unsigned char *sha1)
 }
 
 static const char *mktree_usage[] = {
-	"git mktree [-z]",
+	"git mktree [-z] [--missing]",
 	NULL
 };