This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to keep Reviewed-by lines in git commits with gerrit.


Hi Carlos,

Carlos O'Donell wrote:
> On 11/12/19 2:59 PM, Jonathan Nieder wrote:

>> There's a Gerrit hackathon[3] ongoing as we speak.  If you have any
>> questions you'd like me to relay to Gerrit devs or if you'd like to
>> meet up on IRC or video chat, let me know.
>
> Jonathan,
>
> One question I have, which Simon and I are discussing is:
>
> How do you configure gerrit to support using a remote repository?
>
> It would seem that it should be possible to run gerrit on box X, while
> box Y hosts the git instance, but if this is not possible, then it isn't
> entirely clear from the documentation.
>
> Can replication be used for this feature?

Sorry for the slow reply.  Gerrit really wants to "own" the branches
it writes to, since its role is that of an automated maintainer (that
is, it controls what can be pushed to each branch, vets whether there
has been adequate code review, and so on).  It copes fine with the
repository being updated behind its back but does not know how to do
any fancy two-way sync with a remote repository.

That means you could do one of the following things:

 1. Treat the gerrit-hosted repository as "source of truth", push all
    changes through there, and use the replication plugin to mirror to
    sourceware.org.

    1a. Install a pre-receive hook at sourceware.org to remind people
        to push to Gerrit instead.

    1b. Even better would be a hook at sourceware.org that forwards
	the push to Gerrit transparently.  Alas, Git's update hook
	doesn't provide a way to respond with "I performed the update
	on my own; please report success and skip performing the ref
	update", so this would require improving that part of Git's
	hook interface.

 2. Treat the sourceware.org repository as "source of truth" and use
    Gerrit for reviews only until you've installed Gerrit there (as
    you're doing now)

 3. Try to do something fancy with two-way sync.

At first glance, either (1a) or (2) looks sensible to me.  I'm happy
to help in any way I can (or get one of the more experienced Gerrit
admins here involved ;-)).

Thanks,
Jonathan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]