Discussion:
[git-users] Collective noun for Git branch, tag, or revision
Ilya Vassilevsky
2018-11-26 14:20:15 UTC
Permalink
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.

Thanks!
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Konstantin Khomoutov
2018-11-26 14:51:16 UTC
Permalink
Post by Ilya Vassilevsky
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Philip Oakley
2018-11-26 15:20:33 UTC
Permalink
This time from my correct email address...

-------- Forwarded Message --------
Subject: Re: [git-users] Collective noun for Git branch, tag, or revision
Date: Mon, 26 Nov 2018 14:59:47 +0000
From: Philip Oakley <***@xx
To: git-***@googlegroups.com, Ilya Vassilevsky <***@gmail.com>



Hi Ily,

I think the technically correct term is 'reference' but, you would be
right, that it is very confusing. i.e. those items in the `refs/`
directory see <refname> [1]

e.g. my
https://stackoverflow.com/questions/11792538/in-git-what-is-the-difference-between-a-commits-and-a-revisions

The distinction [for you?] should be between the object types you can
"compile and deploy". If you can "compile and deploy" a tree, then you
have probably dug a hole in which to bury the terminology.

If the only things you want to "compile and deploy" are only commits,
then it is easier and more consistently a reference (but still not
perfectly).

In the Git history there is (IIRC) a tag (a mistake by Linus of all
people!) that actually tags a tree, rather than a commit. This means
that tags can reference other objects of a type you may not want to allow!

The other problem is a raw sha1 (oid) value (given as a string) can be a
'reference', and has the same multi-way object type designation issue.

I think you end up with allowing "commits and references to commits".

Philip
PS try 'git help revisions' to see the guide
https://git-scm.com/docs/gitrevisions

[1]
https://git-scm.com/docs/gitrevisions#gitrevisions-emltrefnamegtemegemmasterememheadsmasterememrefsheadsmasterem
(just how they created that section link I don't want to know ;-)
Post by Ilya Vassilevsky
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.
Thanks!
-- 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
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael
2018-11-26 20:17:04 UTC
Permalink
How about one of these:

refish
shaish
commitish
treeish

Actually, "treeish" or commitish might be best -- you want to specify the state of a directory tree, and you are probably using something that identifies a commit, which identifies a tree plus a message.
Post by Philip Oakley
This time from my correct email address...
-------- Forwarded Message --------
Subject: Re: [git-users] Collective noun for Git branch, tag, or revision
Date: Mon, 26 Nov 2018 14:59:47 +0000
Hi Ily,
I think the technically correct term is 'reference' but, you would be right, that it is very confusing. i.e. those items in the `refs/` directory see <refname> [1]
e.g. my https://stackoverflow.com/questions/11792538/in-git-what-is-the-difference-between-a-commits-and-a-revisions
The distinction [for you?] should be between the object types you can "compile and deploy". If you can "compile and deploy" a tree, then you have probably dug a hole in which to bury the terminology.
If the only things you want to "compile and deploy" are only commits, then it is easier and more consistently a reference (but still not perfectly).
In the Git history there is (IIRC) a tag (a mistake by Linus of all people!) that actually tags a tree, rather than a commit. This means that tags can reference other objects of a type you may not want to allow!
The other problem is a raw sha1 (oid) value (given as a string) can be a 'reference', and has the same multi-way object type designation issue.
I think you end up with allowing "commits and references to commits".
Philip
PS try 'git help revisions' to see the guide https://git-scm.com/docs/gitrevisions
[1] https://git-scm.com/docs/gitrevisions#gitrevisions-emltrefnamegtemegemmasterememheadsmasterememrefsheadsmasterem (just how they created that section link I don't want to know ;-)
Post by Ilya Vassilevsky
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.
Thanks!
-- You received this message because you are subscribed to the Google Groups "Git for human beings" group.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Git for human beings" group.
For more options, visit https://groups.google.com/d/optout.
---
Entertaining minecraft videos
http://YouTube.com/keybounce
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...