[phobos] Push or pull?

Lars Tandle Kyllingstad lars at kyllingen.net
Fri Feb 4 06:36:55 PST 2011


I have started writing a guide now.  I'll hold off giving you the
address until the bottom of this message, because I'd like you to read
my comments on the following first. ;)

In general, I would say that since we have chosen GitHub as the place to
host our code, we are probably best off adapting the kind of workflow
that GitHub encourages.


On Thu, 2011-02-03 at 10:54 -0600, Andrei Alexandrescu wrote:
> Lars, you seem to know your way around the process. Do you think you 
> could put together a short document and a collection of scripts that 
> people can use? The workflows involved are:
> 
> 1. I am done making a change and want to submit it for review.

In GitHub, this is done by clicking "Pull Request".  It would of course
be nice to be able to do this from the command line, and I'm pretty sure
it is possible to make a short script that uses GitHub's API to do this.
I'm going offline for the weekend, but I'll look into it next week.


> 2. Reviewers gave feedback and I need to change my stuff and submit it 
> back for review. Preferably there would be an obvious connection between 
> the first and subsequent submissions.

>From what I understand, this happens automatically.  When you make
further commits to the branch from which you issued the pull request,
the request is automatically updated with the changes.


> 3. Reviewers are okay with my changes, I need to upload them.
> 
> Ideally we'd have a means of enforcement, i.e. no code makes it that 
> didn't get "OK" at least from one reviewer. Also, even if one reviewer 
> gave "OK" another one could veto.
> 
> We use a similar process at Facebook and it is extremely helpful.

Russel suggested Gerrit, which seems to be exactly what you're looking
for.  However, Gerrit is a Git server in its own right, and encourages a
quite different workflow than GitHub.  In general, it seems Gerrit and
GitHub don't play nice together:

  http://stackoverflow.com/questions/2451644/gerrit-with-github

(Scott Chacon is one of the GitHub devs, by the way, so he should know.)

Instead, I suggest we do one of the following two things:

1. Trust people not to commit anything unless it has been reviewed and
OK'ed by at least two other team members.

2. Revoke everyone except Andrei's (and possibly one or two others')
push privileges, and leave the job of integrating our changes to those
select few.

The latter is the "traditional" git way to do it, but it means more work
for those chosen to be the integrators.  My vote goes to 1.


Ok, now you can read my draft and comment on it.  Like I said, I'm going
away for the weekend, so I probably won't be able to respond to any
comments until Monday.

  http://www.kyllingen.net/guide.html


-Lars



More information about the phobos mailing list