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

[PATCH v2 1/4] rev-parse: deprecate use as an option sifter

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
May 14, 2010, 18:26 UTC
Message-ID
<725860e3bfc692c7241695ef5f554ff73f277b15.1273861341.git.git@drmicha.warpmail.net>
In-Reply-To
<4BED7574.4070503@drmicha.warpmail.net>

This command used to be used to distinguish between parameters meant for rev-list and others, but this is deprectated now, and one should not rely on rev-parse keeping up to date with rev-list. State this in the man page and reword the title according to the primary use (converting symbolic names to SHA1's).

Reference: <http://permalink.gmane.org/gmane.comp.version-control.git/146118>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 Documentation/git-rev-parse.txt |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 8db600f..99d2a79 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -3,7 +3,7 @@ git-rev-parse(1)
 
 NAME
 ----
-git-rev-parse - Pick out and massage parameters
+git-rev-parse - Parse symbolic names into object names
 
 
 SYNOPSIS
@@ -13,12 +13,18 @@ SYNOPSIS
 DESCRIPTION
 -----------
 
-Many git porcelainish commands take mixture of flags
+The primary use of 'git rev-parse' is to turn symbolic object names into
+40-letter object names ("SHA-1").
+
+Also, many git porcelainish commands take a mixture of flags
 (i.e. parameters that begin with a dash '-') and parameters
 meant for the underlying 'git rev-list' command they use internally
 and flags and parameters for the other commands they use
-downstream of 'git rev-list'.  This command is used to
-distinguish between them.
+downstream of 'git rev-list'.  This command used to be used to
+distinguish between them, but this is deprectated now, and you should
+not expect 'git rev-parse' to keep up to date with newer parameters for
+'git rev-list'. You can use linkgit:git-rev-list[1] directly or
+linkgit:git-for-each-ref[1] for scripting.
 
 
 OPTIONS
-- 
1.7.1.240.geeaa4d
Previous: Michael J GruberNext: Michael J Gruber
Message 15 of 27 in “revlist/rev-parse: Introduce --heads and --locals revision specifiers”
  1. revlist/rev-parse: Introduce --heads and --locals revision specifiersMichael J Gruber, May 1, 2010
  2. Jakub NarebskiMay 1, 2010
  3. Michael J GruberMay 1, 2010
  4. Jakub NarebskiMay 1, 2010
  5. Jeff KingMay 2, 2010
  6. Michael J GruberMay 2, 2010
  7. Jeff KingMay 5, 2010
  8. 0/4 All is too muchMichael J Gruber, May 13, 2010
  9. Jeff KingMay 14, 2010
  10. Michael J GruberMay 14, 2010
  11. Git methodology questionAkhbari, Farshad, May 14, 2010
  12. Chris PackhamMay 14, 2010
  13. Avery PennarunMay 14, 2010
  14. 0/4 All is too muchMichael J Gruber, May 14, 2010
  15. 1/4 rev-parse: deprecate use as an option sifterMichael J Gruber, May 14, 2010
  16. 2/4 t6018: add tests for rev-list's --branches and --tagsMichael J Gruber, May 14, 2010
  17. 3/4 t6018: make sure all tested symbolic names are different revsMichael J Gruber, May 14, 2010
  18. 4/4 revlist: Introduce --lrbranches and --locals revision specifiersMichael J Gruber, May 14, 2010
  19. 1/4 rev-parse: deprecate use as an option sifterMichael J Gruber, May 13, 2010
  20. Jakub NarebskiMay 14, 2010
  21. Michael J GruberMay 14, 2010
  22. Jakub NarebskiMay 14, 2010
  23. Michael J GruberMay 14, 2010
  24. Thomas RastMay 17, 2010
  25. 2/4 t6018: add tests for rev-list's --branches and --tagsMichael J Gruber, May 13, 2010
  26. 3/4 t6018: make sure all tested symbolic names are different revsMichael J Gruber, May 13, 2010
  27. 4/4 revlist: Introduce --lrbranches and --locals revision specifiersMichael J Gruber, May 13, 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.