X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-ls-tree.txt;h=16e87fd6dd548d462715d394df0586bd9cb5d3ec;hb=e521850bfd4aa79632c99293a39dad56bcaa4143;hp=4c7262f1cd82ca8d9ea6be638d23b18d9bba3738;hpb=4d9e42f8f11c57b32b976a943c8ddaf6214e64b8;p=git.git diff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt index 4c7262f1c..16e87fd6d 100644 --- a/Documentation/git-ls-tree.txt +++ b/Documentation/git-ls-tree.txt @@ -10,8 +10,8 @@ SYNOPSIS -------- [verse] 'git ls-tree' [-d] [-r] [-t] [-l] [-z] - [--name-only] [--name-status] [--full-name] [--abbrev=[]] - [paths...] + [--name-only] [--name-status] [--full-name] [--full-tree] [--abbrev[=]] + [...] DESCRIPTION ----------- @@ -19,17 +19,19 @@ Lists the contents of a given tree object, like what "/bin/ls -a" does in the current working directory. Note that: - the behaviour is slightly different from that of "/bin/ls" in that the - 'paths' denote just a list of patterns to match, e.g. so specifying + '' denotes just a list of patterns to match, e.g. so specifying directory name (without '-r') will behave differently, and order of the arguments does not matter. - - the behaviour is similar to that of "/bin/ls" in that the 'paths' is + - the behaviour is similar to that of "/bin/ls" in that the '' is taken as relative to the current working directory. E.g. when you are in a directory 'sub' that has a directory 'dir', you can run 'git ls-tree -r HEAD dir' to list the contents of the tree (that is 'sub/dir' in 'HEAD'). You don't want to give a tree that is not at the - root level (e.g. 'git ls-tree -r HEAD:sub dir') in this case, as that + root level (e.g. `git ls-tree -r HEAD:sub dir`) in this case, as that would result in asking for 'sub/sub/dir' in the 'HEAD' commit. + However, the current working directory can be ignored by passing + --full-tree option. OPTIONS ------- @@ -59,14 +61,18 @@ OPTIONS --abbrev[=]:: Instead of showing the full 40-byte hexadecimal object - lines, show only handful hexdigits prefix. + lines, show only a partial prefix. Non default number of digits can be specified with --abbrev=. --full-name:: Instead of showing the path names relative to the current working directory, show the full path names. -paths:: +--full-tree:: + Do not limit the listing to the current working directory. + Implies --full-name. + +[...]:: When paths are given, show them (note that this isn't really raw pathnames, but rather a list of patterns to match). Otherwise implicitly uses the root level of the tree as the sole path argument. @@ -76,8 +82,10 @@ Output Format ------------- SP SP TAB -When the `-z` option is not used, TAB, LF, and backslash characters +Unless the `-z` option is used, TAB, LF, and backslash characters in pathnames are represented as `\t`, `\n`, and `\\`, respectively. +This output format is compatible with what `--index-info --stdin` of +'git update-index' expects. When the `-l` option is used, format changes to @@ -87,18 +95,6 @@ Object size identified by is given in bytes, and right-justified with minimum width of 7 characters. Object size is given only for blobs (file) entries; for other entries `-` character is used in place of size. - -Author ------- -Written by Petr Baudis -Completely rewritten from scratch by Junio C Hamano , -another major rewrite by Linus Torvalds - -Documentation --------------- -Documentation by David Greaves, Junio C Hamano and the git-list -. - GIT --- Part of the linkgit:git[1] suite