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