X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-ls-tree.txt;h=16e87fd6dd548d462715d394df0586bd9cb5d3ec;hb=795283c4156eaa9200f29bc3e9a1811c96feecdd;hp=f68e5c5c1abd15350e679eebf976f0ac8516123b;hpb=77f143bf3e218857ec8e5244d7e862e8e0c1a041;p=git.git diff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt index f68e5c5c1..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] [--full-tree] [--abbrev=[]] - [paths...] + [--name-only] [--name-status] [--full-name] [--full-tree] [--abbrev[=]] + [...] DESCRIPTION ----------- @@ -19,16 +19,16 @@ 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. @@ -72,7 +72,7 @@ OPTIONS Do not limit the listing to the current working directory. Implies --full-name. -paths:: +[...]:: 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. @@ -82,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 @@ -93,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