Skip to content

Commit e1a5977

Browse files
Nanako Shiraishigitster
authored andcommitted
Document git-ls-tree --full-tree
Signed-off-by: Nanako Shiraishi <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d4789c6 commit e1a5977

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Documentation/git-ls-tree.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SYNOPSIS
1010
--------
1111
[verse]
1212
'git ls-tree' [-d] [-r] [-t] [-l] [-z]
13-
[--name-only] [--name-status] [--full-name] [--abbrev=[<n>]]
13+
[--name-only] [--name-status] [--full-name] [--full-tree] [--abbrev=[<n>]]
1414
<tree-ish> [paths...]
1515

1616
DESCRIPTION
@@ -30,6 +30,8 @@ in the current working directory. Note that:
3030
'sub/dir' in 'HEAD'). You don't want to give a tree that is not at the
3131
root level (e.g. 'git ls-tree -r HEAD:sub dir') in this case, as that
3232
would result in asking for 'sub/sub/dir' in the 'HEAD' commit.
33+
However, the current working directory can be ignored by passing
34+
--full-tree option.
3335

3436
OPTIONS
3537
-------
@@ -66,6 +68,10 @@ OPTIONS
6668
Instead of showing the path names relative to the current working
6769
directory, show the full path names.
6870

71+
--full-tree::
72+
Do not limit the listing to the current working directory.
73+
Implies --full-name.
74+
6975
paths::
7076
When paths are given, show them (note that this isn't really raw
7177
pathnames, but rather a list of patterns to match). Otherwise

builtin-ls-tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static int chomp_prefix;
2323
static const char *ls_tree_prefix;
2424

2525
static const char ls_tree_usage[] =
26-
"git ls-tree [-d] [-r] [-t] [-l] [-z] [--name-only] [--name-status] [--full-name] [--abbrev[=<n>]] <tree-ish> [path...]";
26+
"git ls-tree [-d] [-r] [-t] [-l] [-z] [--name-only] [--name-status] [--full-name] [--full-tree] [--abbrev[=<n>]] <tree-ish> [path...]";
2727

2828
static int show_recursive(const char *base, int baselen, const char *pathname)
2929
{

0 commit comments

Comments
 (0)