Re: RFE: support change-id generation natively
- From
Shawn Pearce <spearce@spearce.org>
- Date
- Oct 21, 2013, 23:10 UTC
- Message-ID
- <CAJo=hJsEHO7ZL6UBbBBijRNHqk=ttA07cFJ7KBW381jTEpvOQw@mail.gmail.com>
- In-Reply-To
- <1382380858.25852.36711509.53CF173C@webmail.messagingengine.com>
On Mon, Oct 21, 2013 at 11:40 AM, <james.moger@gitblit.com> wrote:
Show 10 quoted lines
> > On Mon, Oct 21, 2013, at 02:29 PM, Thomas Koch wrote: >> As I understand, a UUID could also be used for the same purbose as the >> change- >> id. How is the change-id generated by the way? Would it be a good english >> name >> to call it enduring commit identifier? > > Here is the algorithm: > https://git.eclipse.org/c/jgit/jgit.git/tree/org.eclipse.jgit/src/org/eclipse/jgit/util/ChangeIdUtil.java#n78
For the hyperlink and Java challenged, the Change-Id is essentially the commit SHA-1 had the Change-Id not been included. The shell script hook Gerrit recommends for use with `git commit` uses `git commit-tree` to compute the hash. Which of course later differs after the Change-Id is inserted.
> I think "enduring commit id" is a fair interpretation of it's purpose. > I don't speak for the Gerrit developers so I can not say if they are > interested in alternative id generation. I come to the list as a > change-id user/consumer.
As Martin Fick said, we would be open to an alternative if a better one is presented, especially if it is supported by git commit.