[Pharo-dev] contribution workflow

Guillermo Polito guillermopolito at gmail.com
Tue Jan 22 04:27:15 EST 2019

Hi Ben,

I'll just expand a bit on what Pavel said.

On Mon, Jan 21, 2019 at 4:59 PM Ben Coman <btc at openinworld.com> wrote:

> I'm not sure how closely my contribution workflow matches the standard
> advertised, so just wanted to share it for feedback.  I may remember
> wrongly, but my understanding of the advertised process was forking the
> "pharo-project/pharo" repo, then cloning from my fork.  However I found it
> awkward to keep the "master" branch of my fork synchronised with upstream.

It's important to understand that you don't need to keep any branch in your
fork synchronized ^^.
Pull requests bind two branches, not two repositories.
Your repository may have 30 branches, all outdated, and the only one that
needs to be "up to date" is the one participating in a pull request.

Even, I'd say it's not really required to have the branch of the PR up to
date either, as git will just make a merge with it, calculating correctly
the point of divergence between the two branches. However, making a branch
that started too far away in the history (too old) will just increase the
possibility of a merge conflict. Actually, the easiest is that you start
working on a branch whose tip points to the same commit the image was
created from.
This is to make sure that:
 - you will have correct diffs
 - your PR does not introduce commits that you did not intend to

And that's what Iceberg repair actions will guide you to.

> What I ended up finding easiest is *always* cloning "pharo-project/pharo"
> then adding my "bencoman/pharo" repo as a remote.  Iceberg then makes it
> simple to push just my working branches to my fork from where I can issue a
> PR.  I never need to trouble synchronising the master branch in my fork.
> How does that compare to your contribution workflow?

What I do:
 - I download a new image, that was built from commit xxx (the image and
iceberg know that, so you don't have to care about it)
 - then I clone pharo from my fork, or I make the existing pharo repo point
to an existing clone
    - (this is automatically done for you) iceberg github integration will
make a request to github asking if the repository is a fork or not, and in
the case IT IS it will configure the remotes for you
 - iceberg will most surely tell me "Fetch required". This means that the
commit of my image is not in the cloned repository. I do a fetch.
 - Then I create a branch from my image commit

>From that point on, everything is up and running. You can just work,
commit, push to your fork, make a PR.

> cheers -ben


Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - *http://www.cnrs.fr

*Web:* *http://guillep.github.io* <http://guillep.github.io>

*Phone: *+33 06 52 70 66 13
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20190122/cad1d8de/attachment.html>

More information about the Pharo-dev mailing list