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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 18, 2010, 18:50 UTC
Message-ID
<7voc8ihq4a.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20101218074718.GA6187@burratino>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 8 quoted lines
> Mark Lodato wrote:
>
>> There are some places that literally require a full, 40-character SHA-1
>> ID, rather than a generic revision specifier.
>
> One name I have seen for these is "object IDs", as in git get-tar-commit-id
> (to avoid putting too much emphasis on precisely how the identifiers are
> chosen).

Yes, I think I also saw "a full object name" (cf. diff --full-index) and evan "object name" (cf. git-pack-objects(1)). These are all deliberate efforts to stay away from spelling SHA-1 explicitly, and I think it makes sense to do so here. "40-digit object ID" is a mouthful, though.

As to what this series tries to do, I think it is generally a good idea to start allowing documents to say <tree> when a reader can plug either a commit or a tree, rather than <tree-ish>, only because all Porcelains automatically dereference object names to needed types these days.

But such a change needs to mark places that _must_ take the name of an object of the specific type somehow. It is Ok to say ls-tree takes a tree, but then we must say you should feed commit-tree nothing but a tree.

It is a separate issue to allow plumbings to automatically dereference when both of the following two conditions hold: (1) the intent is clear from the context; (2) nobody sane would have been relying on the side effect of the current typechecking.

Letting commit-tree to unwrap a tree-ish to a tree would be a good example that clearly satisfies (1)---I am not sure about the other one.

Previous: Jonathan NiederNext: Mark Lodato
Message 8 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.