Thread (19 messages) flat view 19 messages, 5 authors, 2016-06-15

Re: [PATCH v3] perl/Git.pm: add parse_rev method

From: Lea Wiemann <hidden>
Date: 2016-06-15 22:44:40

Lea Wiemann wrote:
Re: [PATCH v3] perl/Git.pm: add parse_rev method

The parse_rev method takes a revision name and returns a SHA1 hash,
like the git-rev-parse command.
I just discovered that you can also pass tree and blob identifiers to 
git-rev-parse, like <commit>:<path>.

Hence, perhaps this method would be more appropriately named get_hash 
(or get_sha1), given that you can pass in things other than revisions. 
I'll probably post new patch versions soon.

Terminology question: Is there *any* kind of agreed-on name for the 
identifiers you pass into git-rev-parse (like HEAD^2 or 
master:test/foo.txt)?  I called it "revision name" before, but that's 
wrong for the "...:<path>" syntaxes, and "object identifier" is reserved 
for hashes only (according to the glossary).  If there no better 
suggestions, I'll probably go for "extended identifiers", since 
rev-parse --help calls this the "extended SHA1 syntax", and it also 
seems to be an unused term.

-- Lea
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help