X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-ls-files.txt;h=076cebca1747ed8e35b71aefa2cae9d428a0d1e4;hb=726f852b0ed7e03e88c419a9996c3815911c9db1;hp=fe8ac1b0e5bf2cd036a4a241fb3812506a99d95c;hpb=290252e06341c05fcebb65784ad05c37656ae36d;p=git.git diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt index fe8ac1b0e..076cebca1 100644 --- a/Documentation/git-ls-files.txt +++ b/Documentation/git-ls-files.txt @@ -3,7 +3,7 @@ git-ls-files(1) NAME ---- -git-ls-files - Information about files in the index/working directory +git-ls-files - Show information about files in the index and the working tree SYNOPSIS @@ -14,8 +14,9 @@ SYNOPSIS (-[c|d|o|i|s|u|k|m])\* [-x |--exclude=] [-X |--exclude-from=] - [--exclude-per-directory=] - [--full-name] [--] []\* + [--exclude-per-directory=] + [--error-unmatch] + [--full-name] [--abbrev] [--] []\* DESCRIPTION ----------- @@ -41,8 +42,8 @@ OPTIONS Show other files in the output -i|--ignored:: - Show ignored files in the output - Note the this also reverses any exclude list present. + Show ignored files in the output. + Note that this also reverses any exclude list present. -s|--stage:: Show stage files in the output @@ -51,6 +52,9 @@ OPTIONS If a whole directory is classified as "other", show just its name (with a trailing slash) and not its whole contents. +--no-empty-directory:: + Do not list empty directories. Has no effect without --directory. + -u|--unmerged:: Show unmerged files in the output (forces --stage) @@ -73,6 +77,10 @@ OPTIONS read additional exclude patterns that apply only to the directory and its subdirectories in . +--error-unmatch:: + If any does not appear in the index, treat this as an + error (return 1). + -t:: Identify the file status with the following tags (followed by a space) at the start of each line: @@ -93,7 +101,12 @@ OPTIONS option forces paths to be output relative to the project top directory. ---:: +--abbrev[=]:: + Instead of showing the full 40-byte hexadecimal object + lines, show only handful hexdigits prefix. + Non default number of digits can be specified with --abbrev=. + +\--:: Do not interpret any more arguments as options. :: @@ -182,8 +195,7 @@ An exclude pattern is of the following format: - if it does not contain a slash '/', it is a shell glob pattern and used to match against the filename without - leading directories (i.e. the same way as the current - implementation). + leading directories. - otherwise, it is a shell glob pattern, suitable for consumption by fnmatch(3) with FNM_PATHNAME flag. I.e. a @@ -195,7 +207,7 @@ An exclude pattern is of the following format: An example: -------------------------------------------------------------- - $ cat .git/ignore + $ cat .git/info/exclude # ignore objects and archives, anywhere in the tree. *.[oa] $ cat Documentation/.gitignore @@ -205,10 +217,23 @@ An example: !foo.html $ git-ls-files --ignored \ --exclude='Documentation/*.[0-9]' \ - --exclude-from=.git/ignore \ + --exclude-from=.git/info/exclude \ --exclude-per-directory=.gitignore -------------------------------------------------------------- +Another example: + +-------------------------------------------------------------- + $ cat .gitignore + vmlinux* + $ ls arch/foo/kernel/vm* + arch/foo/kernel/vmlinux.lds.S + $ echo '!/vmlinux*' >arch/foo/kernel/.gitignore +-------------------------------------------------------------- + +The second .gitignore keeps `arch/foo/kernel/vmlinux.lds.S` file +from getting ignored. + See Also --------