Skip to content

Commit e01662b

Browse files
micichgitster
authored andcommitted
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>
1 parent 1c64e79 commit e01662b

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

Documentation/git-mktree.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,26 @@ git-mktree - Build a tree-object from ls-tree formatted text
88

99
SYNOPSIS
1010
--------
11-
'git mktree' [-z]
11+
'git mktree' [-z] [--missing]
1212

1313
DESCRIPTION
1414
-----------
15-
Reads standard input in non-recursive `ls-tree` output format,
16-
and creates a tree object. The object name of the tree object
15+
Reads standard input in non-recursive `ls-tree` output format, and creates
16+
a tree object. The order of the tree entries is normalised by mktree so
17+
pre-sorting the input is not required. The object name of the tree object
1718
built is written to the standard output.
1819

1920
OPTIONS
2021
-------
2122
-z::
2223
Read the NUL-terminated `ls-tree -z` output instead.
2324

25+
--missing::
26+
Allow missing objects. The default behaviour (without this option)
27+
is to verify that each tree entry's sha1 identifies an existing
28+
object. This option has no effect on the treatment of gitlink entries
29+
(aka "submodules") which are always allowed to be missing.
30+
2431
Author
2532
------
2633
Written by Junio C Hamano <gitster@pobox.com>

builtin-mktree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static void write_tree(unsigned char *sha1)
6363
}
6464

6565
static const char *mktree_usage[] = {
66-
"git mktree [-z]",
66+
"git mktree [-z] [--missing]",
6767
NULL
6868
};
6969

0 commit comments

Comments
 (0)