* [PATCH/RFC] Clarified how pattern works in documentation to git-show-ref.
@ 2008-08-28 20:37 Garry Dolley
2008-08-29 5:04 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Garry Dolley @ 2008-08-28 20:37 UTC (permalink / raw)
To: git; +Cc: Garry Dolley, Garry Dolley
Several people in #git, including myself, thought that the following would
show all refs:
git show-ref '*'
Since that is not how the pattern patching works, clarification was needed
in the documentation.
Signed-off-by: Garry Dolley <gdolley@ucla.edu>
---
I think including a little more info in the docs regarding the pattern would
be helpful. Comments?
This is my first patch, I tried to follow all the rules in the
SubmittingPatches doc. If I missed anything, I apologize.
Documentation/git-show-ref.txt | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt
index 2f173ff..5966450 100644
--- a/Documentation/git-show-ref.txt
+++ b/Documentation/git-show-ref.txt
@@ -86,7 +86,8 @@ OPTIONS
<pattern>...::
- Show references matching one or more patterns.
+ Show references matching one or more patterns. The pattern is tail-matched,
+ achored on a '/' boundary; pattern does not accept globs.
OUTPUT
------
@@ -127,7 +128,8 @@ use:
-----------------------------------------------------------------------------
This will show "refs/heads/master" but also "refs/remote/other-repo/master",
-if such references exists.
+if such references exists. This will not match "refs/heads/master2", because
+the pattern is tail-matched.
When using the '--verify' flag, the command requires an exact path:
--
1.6.0.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH/RFC] Clarified how pattern works in documentation to git-show-ref.
2008-08-28 20:37 [PATCH/RFC] Clarified how pattern works in documentation to git-show-ref Garry Dolley
@ 2008-08-29 5:04 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2008-08-29 5:04 UTC (permalink / raw)
To: Garry Dolley; +Cc: git, Garry Dolley
Garry Dolley <gdolley@arpnetworks.com> writes:
> Several people in #git, including myself, thought that the following would
> show all refs:
>
> git show-ref '*'
>
> Since that is not how the pattern patching works, clarification was needed
> in the documentation.
>
> Signed-off-by: Garry Dolley <gdolley@ucla.edu>
> ---
>
> I think including a little more info in the docs regarding the pattern would
> be helpful. Comments?
Would be helpful.
It may be worthwhile to know that that "pathspec" limiting done by
revision traversal ("git log", "git rev-list") and diff is also without
globbing, but it is a head-match, and match is forced at '/' boundary.
ls-files and grep know how to glob, on the other hand.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-29 5:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-28 20:37 [PATCH/RFC] Clarified how pattern works in documentation to git-show-ref Garry Dolley
2008-08-29 5:04 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).