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

[PATCH] git-show-ref.txt: clarify the pattern matching

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Oct 18, 2010, 11:33 UTC
Message-ID
<21215c6fd41bd344c4226f410b69680f3901549b.1287401559.git.git@drmicha.warpmail.net>
In-Reply-To
<201010181203.38554.jnareb@gmail.com>

git-show-ref really does not do what one would expect under the name pattern matching, so describe it.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 Documentation/git-show-ref.txt |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt
index 4696af7..be0ec18 100644
--- a/Documentation/git-show-ref.txt
+++ b/Documentation/git-show-ref.txt
@@ -84,7 +84,11 @@ OPTIONS
 
 <pattern>...::
 
-	Show references matching one or more patterns.
+	Show references matching one or more patterns. Patterns are matched from
+	the end of the full name, and only complete parts are matched, e.g.
+	'master' matches 'refs/heads/master', 'refs/remotes/origin/master',
+	'refs/tags/jedi/master' but not 'refs/heads/mymaster' nor
+	'refs/remotes/master/jedi'.
 
 OUTPUT
 ------
-- 
1.7.3.1.208.g53ea2
Previous: Jakub NarebskiNext: Jakub Narebski
Message 2 of 3 in “[BUG] 'git show-ref <pattern>' doesn't work (shows nothing)”
  1. Jakub NarebskiOct 18, 2010
  2. git-show-ref.txt: clarify the pattern matchingMichael J Gruber, Oct 18, 2010
  3. Jakub NarebskiOct 18, 2010

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.