All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Adam Johnson via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Elijah Newren <newren@gmail.com>, Adam Johnson <me@adamj.eu>,
	Adam Johnson <me@adamj.eu>
Subject: [PATCH v2] ls-files: document that pathspecs are supported
Date: Sun, 12 Mar 2023 11:55:16 +0000	[thread overview]
Message-ID: <pull.1466.v2.git.git.1678622116232.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1466.git.git.1678526355280.gitgitgadget@gmail.com>

From: Adam Johnson <me@adamj.eu>

The command has taken pathspecs, not just filenames, since at least 56fc5108
([PATCH] git-ls-files: generalized pathspecs, 2005-08-21).

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-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1466/adamchainz/doc-ls-files-pathspecs-v2
Pull-Request: https://github.com/git/git/pull/1466

Range-diff vs v1:

 1:  4a0417ba8e5 ! 1:  7c95f4f5a7d ls-files: document that pathspecs are supported
     @@ Metadata
       ## Commit message ##
          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).
     +    The command has taken pathspecs, not just filenames, since at least 56fc5108
     +    ([PATCH] git-ls-files: generalized pathspecs, 2005-08-21).
      
          Signed-off-by: Adam Johnson <me@adamj.eu>
      
     @@ Documentation/git-ls-files.txt: OPTIONS
       
       --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).
     +-	error (return 1).
     ++	If no path that matches <pathspec> appears in the index, treat this as
     ++	an error (return 1).
       
       --with-tree=<tree-ish>::
       	When using --error-unmatch to expand the user supplied
     @@ Documentation/git-ls-files.txt: followed by the  ("attr/<eolattr>").
       	Do not interpret any more arguments as options.
       
      -<file>::
     +-	Files to show. If no files are given all files which match the other
      +<pathspec>::
     - 	Files to show. If no files are given all files which match the other
     ++	Limits the files to show to only those that match any of the given
     ++	pathspecs. If no pathspecs are given, all files which match the other
       	specified criteria are shown.
      ++
      +For details on the <pathspec> syntax, see the 'pathspec' entry in


 Documentation/git-ls-files.txt | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
index 1abdd3c21c5..d69a46f8a56 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
-	error (return 1).
+	If no path that matches <pathspec> appears 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,13 @@ followed by the  ("attr/<eolattr>").
 \--::
 	Do not interpret any more arguments as options.
 
-<file>::
-	Files to show. If no files are given all files which match the other
+<pathspec>::
+	Limits the files to show to only those that match any of the given
+	pathspecs. If no pathspecs 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

      parent reply	other threads:[~2023-03-12 11:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-11  9:19 [PATCH] ls-files: document that pathspecs are supported Adam Johnson via GitGitGadget
2023-03-11 20:33 ` Junio C Hamano
2023-03-12 11:52   ` Adam Johnson
2023-03-12 11:55 ` Adam Johnson via GitGitGadget [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.1466.v2.git.git.1678622116232.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=me@adamj.eu \
    --cc=newren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.