From: "Steven Willis via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Steven Willis <onlynone@gmail.com>, Steven Willis <onlynone@gmail.com>
Subject: [PATCH] doc: ls-tree paths do not support wildcards
Date: Thu, 28 May 2020 21:23:16 +0000 [thread overview]
Message-ID: <pull.796.git.git.1590700996483.gitgitgadget@gmail.com> (raw)
From: Steven Willis <onlynone@gmail.com>
Signed-off-by: Steven Willis <onlynone@gmail.com>
---
doc: ls-tree paths do not support wildcards
The documentation for ls-tree says that paths can be wildcards, but this
appears to be incorrect, only raw paths seem to work.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-796%2Fonlynone%2Fls-tree-paths-do-not-support-wildcards-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-796/onlynone/ls-tree-paths-do-not-support-wildcards-v1
Pull-Request: https://github.com/git/git/pull/796
Documentation/git-ls-tree.txt | 6 +++---
t/t3102-ls-tree-wildcards.sh | 6 ++++++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt
index a7515714da1..8a8ce20cf51 100644
--- a/Documentation/git-ls-tree.txt
+++ b/Documentation/git-ls-tree.txt
@@ -19,7 +19,7 @@ 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
- '<path>' denotes just a list of patterns to match, e.g. so specifying
+ '<path>' denotes just a list of files to match, e.g. so specifying
directory name (without `-r`) will behave differently, and order of the
arguments does not matter.
@@ -74,8 +74,8 @@ OPTIONS
Implies --full-name.
[<path>...]::
- When paths are given, show them (note that this isn't really raw
- pathnames, but rather a list of patterns to match). Otherwise
+ When paths are given, show them (note that this is really raw
+ pathnames, not a list of patterns to match). Otherwise
implicitly uses the root level of the tree as the sole path argument.
diff --git a/t/t3102-ls-tree-wildcards.sh b/t/t3102-ls-tree-wildcards.sh
index 1e16c6b8ea6..6c0f2af1d04 100755
--- a/t/t3102-ls-tree-wildcards.sh
+++ b/t/t3102-ls-tree-wildcards.sh
@@ -33,4 +33,10 @@ test_expect_failure 'ls-tree does not yet support negated pathspec' '
test_cmp expect actual
'
+test_expect_failure 'ls-tree does not yet support wildcard pathspec' '
+ git ls-files "a*" >expect &&
+ git ls-tree --name-only -r HEAD "a*" >actual &&
+ test_cmp expect actual
+'
+
test_done
base-commit: 2d5e9f31ac46017895ce6a183467037d29ceb9d3
--
gitgitgadget
next reply other threads:[~2020-05-28 21:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 21:23 Steven Willis via GitGitGadget [this message]
2020-05-28 21:51 ` [PATCH] doc: ls-tree paths do not support wildcards Jeff King
2020-05-28 22:21 ` Junio C Hamano
2020-05-28 23:04 ` Jeff King
2020-05-28 23:17 ` Junio C Hamano
2020-05-28 22:04 ` Junio C Hamano
2020-05-28 23:16 ` Jeff King
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.796.git.git.1590700996483.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=onlynone@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.