Documentation: sync git.txt command list and manual page title
[git/git.git] / Documentation / git-ls-tree.txt
1 git-ls-tree(1)
2 ==============
3
4 NAME
5 ----
6 git-ls-tree - List the contents of a tree object
7
8
9 SYNOPSIS
10 --------
11 [verse]
12 'git-ls-tree' [-d] [-r] [-t] [-z]
13 [--name-only] [--name-status] [--full-name] [--abbrev=[<n>]]
14 <tree-ish> [paths...]
15
16 DESCRIPTION
17 -----------
18 Lists the contents of a given tree object, like what "/bin/ls -a" does
19 in the current working directory. Note that the usage is subtly different,
20 though - 'paths' denote just a list of patterns to match, e.g. so specifying
21 directory name (without '-r') will behave differently, and order of the
22 arguments does not matter.
23
24 OPTIONS
25 -------
26 <tree-ish>::
27 Id of a tree-ish.
28
29 -d::
30 Show only the named tree entry itself, not its children.
31
32 -r::
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'.
38
39 -z::
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.
45
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
51 --full-name::
52 Instead of showing the path names relative to the current working
53 directory, show the full path names.
54
55 paths::
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.
59
60
61 Output Format
62 -------------
63 <mode> SP <type> SP <object> TAB <file>
64
65 When the `-z` option is not used, TAB, LF, and backslash characters
66 in pathnames are represented as `\t`, `\n`, and `\\`, respectively.
67
68
69 Author
70 ------
71 Written by Petr Baudis <pasky@suse.cz>
72 Completely rewritten from scratch by Junio C Hamano <junkio@cox.net>,
73 another major rewrite by Linus Torvalds <torvalds@osdl.org>
74
75 Documentation
76 --------------
77 Documentation by David Greaves, Junio C Hamano and the git-list
78 <git@vger.kernel.org>.
79
80 GIT
81 ---
82 Part of the gitlink:git[7] suite
83