6 git-ls-tree - List the contents of a tree object
12 'git-ls-tree' [-d] [-r] [-t] [-l] [-z]
13 [--name-only] [--name-status] [--full-name] [--abbrev=[<n>]]
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.
30 Show only the named tree entry itself, not its children.
33 Recurse into sub-trees.
36 Show tree entries even when going to recurse them. Has no effect
37 if '-r' was not passed. '-d' implies '-t'.
41 Show object size of blob (file) entries.
44 \0 line termination on output.
48 List only filenames (instead of the "long" output), one per line.
51 Instead of showing the full 40-byte hexadecimal object
52 lines, show only handful hexdigits prefix.
53 Non default number of digits can be specified with --abbrev=<n>.
56 Instead of showing the path names relative to the current working
57 directory, show the full path names.
60 When paths are given, show them (note that this isn't really raw
61 pathnames, but rather a list of patterns to match). Otherwise
62 implicitly uses the root level of the tree as the sole path argument.
67 <mode> SP <type> SP <object> TAB <file>
69 When the `-z` option is not used, TAB, LF, and backslash characters
70 in pathnames are represented as `\t`, `\n`, and `\\`, respectively.
72 When the `-l` option is used, format changes to
74 <mode> SP <type> SP <object> SP <object size> TAB <file>
76 Object size identified by <object> is given in bytes, and right-justified
77 with minimum width of 7 characters. Object size is given only for blobs
78 (file) entries; for other entries `-` character is used in place of size.
83 Written by Petr Baudis <pasky@suse.cz>
84 Completely rewritten from scratch by Junio C Hamano <junkio@cox.net>,
85 another major rewrite by Linus Torvalds <torvalds@osdl.org>
89 Documentation by David Greaves, Junio C Hamano and the git-list
90 <git@vger.kernel.org>.
94 Part of the linkgit:git[1] suite