Documentation: sync git.txt command list and manual page title
[git/git.git] / Documentation / git-ls-tree.txt
CommitLineData
2cf565c5
DG
1git-ls-tree(1)
2==============
2cf565c5
DG
3
4NAME
5----
c3f0baac 6git-ls-tree - List the contents of a tree object
2cf565c5
DG
7
8
9SYNOPSIS
10--------
fd7e9fb7 11[verse]
cb85bfe5 12'git-ls-tree' [-d] [-r] [-t] [-z]
fd7e9fb7
JF
13 [--name-only] [--name-status] [--full-name] [--abbrev=[<n>]]
14 <tree-ish> [paths...]
2cf565c5
DG
15
16DESCRIPTION
17-----------
7b9b4c45
PB
18Lists the contents of a given tree object, like what "/bin/ls -a" does
19in the current working directory. Note that the usage is subtly different,
20though - 'paths' denote just a list of patterns to match, e.g. so specifying
21directory name (without '-r') will behave differently, and order of the
22arguments does not matter.
2cf565c5
DG
23
24OPTIONS
25-------
26<tree-ish>::
2c6e4771 27 Id of a tree-ish.
2cf565c5 28
6af1f019 29-d::
7b9b4c45 30 Show only the named tree entry itself, not its children.
6af1f019 31
2cf565c5 32-r::
7b9b4c45
PB
33 Recurse into sub-trees.
34
35-t::
36 Show tree entries even when going to recurse them. Has no effect
37 if '-r' was not passed. '-d' implies '-t'.
2cf565c5
DG
38
39-z::
7b9b4c45
PB
40 \0 line termination on output.
41
42--name-only::
43--name-status::
44 List only filenames (instead of the "long" output), one per line.
2cf565c5 45
cb85bfe5
EW
46--abbrev[=<n>]::
47 Instead of showing the full 40-byte hexadecimal object
48 lines, show only handful hexdigits prefix.
49 Non default number of digits can be specified with --abbrev=<n>.
50
fd7e9fb7 51--full-name::
42698220 52 Instead of showing the path names relative to the current working
fd7e9fb7
JF
53 directory, show the full path names.
54
6d3a5077 55paths::
7b9b4c45
PB
56 When paths are given, show them (note that this isn't really raw
57 pathnames, but rather a list of patterns to match). Otherwise
58 implicitly uses the root level of the tree as the sole path argument.
6af1f019 59
6d3a5077 60
2cf565c5
DG
61Output Format
62-------------
6af1f019 63 <mode> SP <type> SP <object> TAB <file>
2cf565c5 64
7b9b4c45
PB
65When the `-z` option is not used, TAB, LF, and backslash characters
66in pathnames are represented as `\t`, `\n`, and `\\`, respectively.
d88156e9 67
2cf565c5
DG
68
69Author
70------
7b9b4c45
PB
71Written by Petr Baudis <pasky@suse.cz>
72Completely rewritten from scratch by Junio C Hamano <junkio@cox.net>,
73another major rewrite by Linus Torvalds <torvalds@osdl.org>
2cf565c5
DG
74
75Documentation
76--------------
7b9b4c45
PB
77Documentation by David Greaves, Junio C Hamano and the git-list
78<git@vger.kernel.org>.
79
2cf565c5
DG
80GIT
81---
a7154e91 82Part of the gitlink:git[7] suite
2cf565c5 83