git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] ls-files: document that pathspecs are supported

From
Adam Johnson via GitGitGadget <gitgitgadget@gmail.com>
Date
Mar 11, 2023, 09:19 UTC
Message-ID
<pull.1466.git.git.1678526355280.gitgitgadget@gmail.com>
From: Adam Johnson <me@adamj.eu>

The command has taken pathspecs, not just filenames, since f0096c06bcd (Convert read_tree{,_recursive} to support struct pathspec, 2011-03-25).

Signed-off-by: Adam Johnson <me@adamj.eu>
---
    ls-files: document that pathspecs are supported
    
    The command has taken pathspecs, not just filenames, since f0096c06bcd
    (Convert read_tree{,_recursive} to support struct pathspec, 2011-03-25).
    
    Signed-off-by: Adam Johnson me@adamj.eu
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1466%2Fadamchainz%2Fdoc-ls-files-pathspecs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1466/adamchainz/doc-ls-files-pathspecs-v1
Pull-Request: https://github.com/git/git/pull/1466
 Documentation/git-ls-files.txt | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
index 1abdd3c21c5..2f62374062c 100644
--- a/Documentation/git-ls-files.txt
+++ b/Documentation/git-ls-files.txt
@@ -21,7 +21,7 @@ SYNOPSIS
 		[--exclude-standard]
 		[--error-unmatch] [--with-tree=<tree-ish>]
 		[--full-name] [--recurse-submodules]
-		[--abbrev[=<n>]] [--format=<format>] [--] [<file>...]
+		[--abbrev[=<n>]] [--format=<format>] [--] [<pathspec>...]
 
 DESCRIPTION
 -----------
@@ -127,12 +127,12 @@ OPTIONS
 	in each directory, and the user's global exclusion file.
 
 --error-unmatch::
-	If any <file> does not appear in the index, treat this as an
+	If any <pathspec> does not appear in the index, treat this as an
 	error (return 1).
 
 --with-tree=<tree-ish>::
 	When using --error-unmatch to expand the user supplied
-	<file> (i.e. path pattern) arguments to paths, pretend
+	<pathspec> (i.e. path pattern) arguments to paths, pretend
 	that paths which were removed in the index since the
 	named <tree-ish> are still present.  Using this option
 	with `-s` or `-u` options does not make any sense.
@@ -225,9 +225,12 @@ followed by the  ("attr/<eolattr>").
 \--::
 	Do not interpret any more arguments as options.
 
-<file>::
+<pathspec>::
 	Files to show. If no files are given all files which match the other
 	specified criteria are shown.
++
+For details on the <pathspec> syntax, see the 'pathspec' entry in
+linkgit:gitglossary[7].
 
 OUTPUT
 ------

base-commit: 725f57037d81e24eacfda6e59a19c60c0b4c8062
-- 
gitgitgadget
Next: Junio C Hamano
Message 1 of 4 in “ls-files: document that pathspecs are supported”
  1. ls-files: document that pathspecs are supportedAdam Johnson via GitGitGadget, Mar 11, 2023
  2. Junio C HamanoMar 11, 2023
  3. Adam JohnsonMar 12, 2023
  4. ls-files: document that pathspecs are supportedAdam Johnson via GitGitGadget, Mar 12, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.