blob: f283bacb6557fe7c1313912402f60e3a1560d04a [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-ls-tree(1)
2==============
3
4NAME
5----
Junio C Hamano01078922006-03-10 00:31:476git-ls-tree - Lists the contents of a tree object
Junio C Hamano1a4e8412005-12-27 08:17:237
8
9SYNOPSIS
10--------
Junio C Hamano33db4372006-06-07 19:51:4511[verse]
Junio C Hamano5c3957e2006-03-28 00:28:0112'git-ls-tree' [-d] [-r] [-t] [-z]
Junio C Hamano33db4372006-06-07 19:51:4513 [--name-only] [--name-status] [--full-name] [--abbrev=[<n>]]
14 <tree-ish> [paths...]
Junio C Hamano1a4e8412005-12-27 08:17:2315
16DESCRIPTION
17-----------
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.
23
24OPTIONS
25-------
26<tree-ish>::
27Id of a tree-ish.
28
29-d::
30Show only the named tree entry itself, not its children.
31
32-r::
33Recurse into sub-trees.
34
35-t::
36Show tree entries even when going to recurse them. Has no effect
37if '-r' was not passed. '-d' implies '-t'.
38
39-z::
40\0 line termination on output.
41
42--name-only::
43--name-status::
44List only filenames (instead of the "long" output), one per line.
45
Junio C Hamano5c3957e2006-03-28 00:28:0146--abbrev[=<n>]::
47Instead of showing the full 40-byte hexadecimal object
48lines, show only handful hexdigits prefix.
49Non default number of digits can be specified with --abbrev=<n>.
50
Junio C Hamano33db4372006-06-07 19:51:4551--full-name::
Junio C Hamanof1d14802006-06-08 00:48:1752Instead of showing the path names relative to the current working
Junio C Hamano33db4372006-06-07 19:51:4553directory, show the full path names.
54
Junio C Hamano1a4e8412005-12-27 08:17:2355paths::
56When paths are given, show them (note that this isn't really raw
57pathnames, but rather a list of patterns to match). Otherwise
58implicitly uses the root level of the tree as the sole path argument.
59
60
61Output Format
62-------------
63 <mode> SP <type> SP <object> TAB <file>
64
65When the `-z` option is not used, TAB, LF, and backslash characters
66in pathnames are represented as `\t`, `\n`, and `\\`, respectively.
67
68
69Author
70------
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>
74
75Documentation
76--------------
77Documentation by David Greaves, Junio C Hamano and the git-list
78<git@vger.kernel.org>.
79
Junio C Hamano1a4e8412005-12-27 08:17:2380GIT
81---
82Part of the gitlink:git[7] suite
83