Re: [PATCH 2/4] glossary: define committish (a.k.a. commit-ish)
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jun 19, 2013, 06:19 UTC
- Message-ID
- <20130619061938.GA2968@elie.Belkin>
- In-Reply-To
- <1371607780-2966-3-git-send-email-rhansen@bbn.com>
Hi,
Richard Hansen wrote:
Show 10 quoted lines
> --- a/Documentation/glossary-content.txt > +++ b/Documentation/glossary-content.txt > @@ -82,6 +82,17 @@ to point at the new commit. > to the top <<def_directory,directory>> of the stored > revision. > > +[[def_committish]]committish (also commit-ish):: > + A <<def_ref,ref>> pointing to an <<def_object,object>> that > + can be recursively dereferenced to a > + <<def_commit_object,commit object>>.
Usually I would expect that the string "4d1c565" is not a ref, but the glossary contains a different definition ("A 40-byte hex representation of a SHA-1 or ..."). I guess we need a shorter name for "extended SHA-1 syntax" (as described in gitrevisions(7)) that is a little less confusing.
Perhaps we can sidestep the issue by saying
A parameter pointing to an <<def_object,object>> that can be recursively dereferenced to ...
since the most common use of "commitish" is in describing a command's syntax. I'm tempted to go even further and just call that a "commit parameter", explaining the more pedantic synonym here --- something like
[[def_commitish]]commitish (also commit-ish):: A commandline parameter to a command that requires a <<def_commit,commit>>. + The following are all commitishes: an expression (see linkgit:gitrevisions[7]) directly representing a commit object, an expression naming a tag that points to a commit object, a tag that points to a tag that points to a commit, etc.
Thanks, Jonathan