On Wed, Oct 23, 2013 at 2:50 AM, Junio C Hamano <gits...@pobox.com> wrote:
> It would be just the matter of updating commit_tree_extended() in
> commit.c to:
>
>  - detect the need to add a new Change-Id: trailer;
>
>  - call hash_sha1_file() on the commit object buffer (assuming that
>    a commit object that you can actually "git cat-file commit" using
>    the change Id does not have to exist anywhere for Gerrit to
>    work---otherwise you would need to call write_sha1_file()
>    instead) before adding Change-Id: trailer;
>
>  - add Change-Id: trailer to the buffer; and then finally
>
>  - let the existing write_sha1_file() to write it out.

I'm not objecting special support for Gerrit, but if the change is
just commit_tree_extended() why don't we just ship the commit hook in
a new "Gerrit" template? It's just a matter of "git init
--template=gerrit" (or something) to create a new repo, or reinit the
current repo and you're set. Of it per-repo is bad, perhaps we could
introduce global hooks (if we haven't had them yet)?
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to