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

[PATCH 3/8] docs: use <sha1> to mean unabbreviated ID

From
Mark Lodato <lodatom@gmail.com>
Date
Dec 18, 2010, 05:38 UTC
Message-ID
<1292650725-21149-4-git-send-email-lodatom@gmail.com>
In-Reply-To
<1292650725-21149-1-git-send-email-lodatom@gmail.com>

There are some places that literally require a full, 40-character SHA-1 ID, rather than a generic revision specifier. Introduce in git(1) the <sha1> terminology to mean this. Use <sha1> in git-diff-tree(1) to note that --stdin only takes <sha1>s, not generic <tree>s or <commit>s. Use <tree> and <commit> in the usage statement for 'commit-tree'.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
---
 Documentation/git-diff-tree.txt |    4 ++--
 Documentation/git.txt           |    5 +++++
 builtin/commit-tree.c           |    2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt
index a7e37b8..6b357a5 100644
--- a/Documentation/git-diff-tree.txt
+++ b/Documentation/git-diff-tree.txt
@@ -49,8 +49,8 @@ include::diff-options.txt[]
 --stdin::
 	When '--stdin' is specified, the command does not take
 	<tree-ish> arguments from the command line.  Instead, it
-	reads lines containing either two <tree>, one <commit>, or a
-	list of <commit> from its standard input.  (Use a single space
+	reads lines containing <sha1>s: either two trees, one commit, or
+	multiple commits from its standard input.  (Use a single space
 	as separator.)
 +
 When two trees are given, it compares the first tree with the second.
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 0128371..7929739 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -457,6 +457,11 @@ list.
 
 Identifier Terminology
 ----------------------
+<sha1>::
+	Indicates a full, 40-character SHA-1 identifier of an object.
+	The type of the referenced object is unspecified.
+	Abbreviated or symbolic identifiers cannot be used.
+
 <object>::
 	Indicates the object name for any type of object.
 
diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c
index d083795..da572c3 100644
--- a/builtin/commit-tree.c
+++ b/builtin/commit-tree.c
@@ -9,7 +9,7 @@
 #include "builtin.h"
 #include "utf8.h"
 
-static const char commit_tree_usage[] = "git commit-tree <sha1> [(-p <sha1>)...] < changelog";
+static const char commit_tree_usage[] = "git commit-tree <tree> [(-p <commit>)...] < changelog";
 
 static void new_parent(struct commit *parent, struct commit_list **parents_p)
 {
-- 
1.7.3.2
Previous: Mark LodatoNext: Jonathan Nieder
Message 6 of 19 in “[PATCHv2 0/8] docs: use metavariables consistently”
  1. Mark LodatoDec 18, 2010
  2. 1/8 fsck docs: remove outdated and useless diagnosticMark Lodato, Dec 18, 2010
  3. 2/8 docs: use `...' instead of `*' for multiplicityMark Lodato, Dec 18, 2010
  4. Jakub NarebskiDec 18, 2010
  5. Mark LodatoDec 18, 2010
  6. 3/8 docs: use <sha1> to mean unabbreviated IDMark Lodato, Dec 18, 2010
  7. Jonathan NiederDec 18, 2010
  8. Junio C HamanoDec 18, 2010
  9. 4/8 http-fetch docs: use <commit-id> consistentlyMark Lodato, Dec 18, 2010
  10. Jonathan NiederDec 18, 2010
  11. 5/8 grep docs: grep accepts a <tree-ish>, not a <tree>Mark Lodato, Dec 18, 2010
  12. 6/8 docs: use <tree> instead of <tree-ish>Mark Lodato, Dec 18, 2010
  13. Jonathan NiederDec 18, 2010
  14. 7/8 docs: use <commit> instead of <commit-ish>Mark Lodato, Dec 18, 2010
  15. Jonathan NiederDec 18, 2010
  16. 8/8 describe docs: note that <commit> is optionalMark Lodato, Dec 18, 2010
  17. Jonathan NiederDec 18, 2010
  18. Mark LodatoDec 18, 2010
  19. Junio C HamanoDec 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.