[Pharo-dev] git feature request

Peter Uhnak i.uhnak at gmail.com
Fri Jul 22 10:11:32 EDT 2016

On Fri, Jul 22, 2016 at 09:14:25PM +0800, Ben Coman wrote:
> On Fri, Jul 22, 2016 at 3:11 PM, Peter Uhnak <i.uhnak at gmail.com> wrote:
> > On Fri, Jul 22, 2016 at 11:55:46AM +0800, Ben Coman wrote:
> >> I'm not sure what the roadmap is for git integration, but just a use case
> >> that occurs to me while I work "a bit with git" for the first time from
> >> Pharo.
> >>
> >> I install a project via a Baseline from git and makes a small improvement.
> >> What is the easiest way to contribute back?  I can't push back to the
> >> personal repo I downloaded from, so the easiest thing would be a single
> >> menu item to:
> >> 1. Fork original repository
> >> 2. Push current in-Image code to a new branch in that fork.
> >>
> >> Maybe even...
> >> 3. Issue a pull request to the original repository.
> >
> > This is indeed the idiomatic way to contribute on GitHub.
> >
> > 1. fork
> > 2. install _your fork_ with gitfiletree/remote git repo
> > 3. make an improvement (you can use master branch, since it's your repo, but that's a detail)
> > 4. issue a pull request
> That is how you do it if you *already* know you want to be contribute
> to an application or package. But what if I was just planning to *use*
> an application or package, only later I ended up tracing down a bug to
> that application and fixed it.  What is the *easiest* for me to push
> to my personal github account from where I make the Pull Request.
> Something like this [1] from within Pharo (disclaimer, I've not
> performed these action before, I had to hunt a bit to find it as an
> example)...

This would depend a bit on how you installed the project to start with.

If you installed it with gitfiletree/remote git repo, then you can follow what you've just posted, because it's the same.

However if you installed it via the github:// protocol (or it was automatically pulled in via some other project's BaselineOf or ConfigurationOf),
then it's a bit of pain, because you can't just pull in another project with the same baseline (Metacello it thinks it's a different project).

Luckily, you should be able to explicitly permit the conflict:

Metacello new
	baseline: 'MyProject';
	repository: 'gitfiletree://wherever';
	onConflict: [:ex | ex allow ];

We should be documenting these things somewhere…


More information about the Pharo-dev mailing list