On Mon, Nov 26, 2018 at 06:20:15AM -0800, Ilya Vassilevsky wrote: > Hello everyone :) > > I'm developing a deployment automation tool. It can compile and deploy code > from a Git repository. > > I would like to add a command-line argument that specifies the revision to > deploy. It can be a branch name, a tag name, or just a plain SHA-1. > > What is the best collective noun for these? > > "Revision" does not cover branches and tags. "Reference" does not cover > revisions. "From" is a good candidate :) but I would like to use something > more Git-specific.
The Git docs have two approaches to naming these things. First any named reference to a commit is called a "ref" which is short for "reference". You can search for "ref" just right there in the top-level git(1) manual (run `git help git`). And that is the reason why "reflog" is named like this and not, say, "revlog" ;-) Second, the docs semi-informally refer to any thing which can be resolved so a commit as "commitish" (or "commit-ish"). For instance, run `git help revisions` and search for the latter form. Commitish is also a more wide term than "a ref or the name of a commit" since a complex combo of '^'-s and '~'-s may be applied to a ref or the name of a commit to refer to some other commit. IOW, a commitish is anything which Git is able to parse in such a way to arrive to a commit. I think the "commitish" may sound too outlandish for people not too familiar with Gits ins and outs, so I'd name your command-line option just "--commit" but stated in the documentation that it really is a "commit-ish" and the user is free to use anything which fits the bill. If your command line parser understands unambiguous prefixes, you may name it "--commitish" and also accept just "--commit". -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.