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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux