From: james.moger@gitblit.com
To: Jeremy Rosen <jeremy.rosen@openwide.fr>
Cc: git@vger.kernel.org
Subject: Re: RFE: support change-id generation natively
Date: Mon, 21 Oct 2013 11:41:59 -0400 [thread overview]
Message-ID: <1382370119.28365.36627953.50C0496E@webmail.messagingengine.com> (raw)
In-Reply-To: <2127507934.9293293.1382367063640.JavaMail.root@openwide.fr>
The change-id is exactly like a commit-id, it is an SHA-1 value, but it
is a constant embedded in the commit message.
Why does Gerrit need this value?
Gerrit is based on the concept of revising/polishing a commit or a
series of commits.
For clarity, consider the case of revising a proposed bug fix.
You checkout the current revision of a proposed bug fix commit that has
a change-id value in it's message. You revise and _amend_ this commit,
preserving the change-id in the commit message. Now your commit-id has
changed, but your change-id is still the same. You then upload your
amended commit to Gerrit which links the amended commit with the
discussion/review.
Commit-ids change all the time because of amend; change-ids are constant
and they are the key that links commit revisions to a discussion.
What I am requesting is a feature that generates and injects the
Change-Id value for the very first commit revision. This commit is
special because it will create the discussion in Gerrit for the commit.
Gerrit relies on client-side change-id generation for this initial
commit. This allows contributors to propose new ideas by implementing
that idea and pushing the proposed implementation to Gerrit. Gerrit
intercepts this and automatically creates a discussion/review keyed by
the specified Change-Id value. And now through the --amend process,
this commit can be revised and polished until it is blessed by a
reviewer for merging to some integration branch.
-J
On Mon, Oct 21, 2013, at 10:51 AM, Jeremy Rosen wrote:
> for those of us that are not using gerrit...
>
> what is a change-id (semantically, I got from your mail that it is some
> sort
> of unit id set at commit time) and in what way is it different from the
> commit-id ?
>
> Cordialement
>
> Jérémy Rosen
> +33 (0)1 42 68 28 04
>
> fight key loggers : write some perl using vim
>
>
> Open Wide Ingenierie
>
> 23, rue Daviel
> 75012 Paris - France
> www.openwide.fr
>
>
>
>
>
> ----- Mail original -----
> > Hello Git Community,
> >
> > TL;DR:
> > It would be a really nice enhancement if the commit command natively
> > supported _optionally_ injecting a "Change-Id: I000..." footer in the
> > last paragraph of the commit message template and then substituting
> > the
> > "I000..." value, on commit, with a generated value _without_ having
> > to
> > rely on a per-repository, native hook or a global hook that affects
> > every local repository.
> >
> > Full Request:
> > Gerrit has established the change-id footer as a prominent and
> > wide-spread collaboration identifier. For those contributing new
> > patches to a Gerrit server, it is required to either use EGit/JGit
> > (Eclipse) to generate commits [1] OR to use a commit hook script with
> > native git to insert a change-id footer during the commit process
> > [2].
> > This per-repository hook script requirement is an obstacle. These
> > communities would be better served and it would lower the
> > contribution
> > barrier for many open source projects if native git supported
> > change-id
> > generation & injection.
> >
> > I acknowledge that not everyone uses nor wants to use Gerrit and the
> > change-id footer. That is fine, but it would be a _tremendous_
> > usability improvement for those contributing to open source projects
> > (myself included) if something like a "--change-id" flag was
> > implemented and maybe even a config setting to always generate a
> > change-id on commit (EGit currently supports this as
> > "gerrit.createchangeid=true").
> >
> > Sadly, my C skills are lacking as I live mostly in the world of
> > managed
> > code, but I'd be very happy to cheer for a change-id champion; I
> > suspect
> > there are some out there who might rally to this cause.
> >
> > Thanks for your consideration.
> > James Moger
> > gitblit.com
> >
> > [1]
> > https://git.eclipse.org/c/jgit/jgit.git/tree/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java?h=stable-3.1#n288
> > [2]
> > http://gerrit-documentation.googlecode.com/svn/Documentation/2.0/cmd-hook-commit-msg.html
> > --
> > To unsubscribe from this list: send the line "unsubscribe git" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
next prev parent reply other threads:[~2013-10-21 15:42 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-21 14:48 RFE: support change-id generation natively james.moger
2013-10-21 14:51 ` Jeremy Rosen
2013-10-21 15:41 ` james.moger [this message]
2013-10-21 16:35 ` Shawn Pearce
2013-10-21 16:38 ` Ondřej Bílka
2013-10-21 23:07 ` Shawn Pearce
2013-10-21 18:29 ` Thomas Koch
2013-10-21 18:40 ` james.moger
2013-10-21 18:49 ` Martin Fick
2013-10-22 19:50 ` Junio C Hamano
2013-10-22 20:06 ` Pyeron, Jason J CTR (US)
2013-10-22 20:43 ` Junio C Hamano
2013-10-23 6:36 ` Duy Nguyen
2013-10-23 16:00 ` Junio C Hamano
2013-10-24 2:07 ` Duy Nguyen
2013-10-24 4:11 ` Nasser Grainawi
2013-10-24 5:25 ` Duy Nguyen
2013-10-24 6:01 ` Johannes Sixt
2013-10-24 12:11 ` james.moger
2013-10-24 12:51 ` Thomas Koch
2013-10-24 13:31 ` Duy Nguyen
2013-10-24 20:04 ` Junio C Hamano
2013-10-25 6:37 ` Johannes Sixt
2013-10-21 23:10 ` Shawn Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382370119.28365.36627953.50C0496E@webmail.messagingengine.com \
--to=james.moger@gitblit.com \
--cc=git@vger.kernel.org \
--cc=jeremy.rosen@openwide.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).