addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwchatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrosseditemptyheartexportfacebookfolderfullheartglobegmailgoogleimageimagesinstagramlinklocation-pinmagnifying-glassmailminusmoremuplabelShape 3 + Rectangle 1outlookpersonplusprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

RE: [ruby-81] git and patch protocols...

From: Jon S.
Sent on: Friday, September 11, 2009 10:03 AM
FYI, Scott... Unless I completely missed it, the wiki page you referenced
talks about using the lighthouseapp ticketing system; there's no pull doc
there and there's no pull option on their github page, either, as there is
for Merb. Looks like I'll be doing a git format-patch...

Thanks again...jon

-----Original Message-----
From: [address removed] [mailto:[address removed]] On Behalf Of Scott
Sent: Wednesday, September 09,[masked]:52 AM
To: [address removed]
Subject: Re: [ruby-81] git and patch protocols...


On Wed, Sep 9, 2009 at 8:15 AM, Jon Seidel<[address removed]> wrote:
> ?
> Hi... I've forked cucumber and patched a couple of bugs.? Now I want 
> to submit them and they (Aslak) wants a diff. Also, I? forked[masked] 
> and now they're now at 0.3.99.

Looking at the cucumber wiki contributing page
(http://wiki.githu...­) it looks like
they'll take a pull request.  You can likely just commit your change, push
it to your cucumber fork on GitHub and then go to that branch and hit the
'pull request' button to ask Aslak to pull your change in.

If you want to make it easier on them, you can rebase your work first
(generally something like 'git fetch origin; git rebase
origin/master') which will reapply the work you have done on top of the
current head - making sure if there are any merge conflicts that you have to
deal with them rather than Aslak.

If you really want to actually send them a patch (although some maintainers
don't like having to apply patches instead of pulling git
branches) you can run 'git fetch origin; git format-patch origin/master'
which will create a mbox formatted email of each commit you've introduced to
the codebase - then you can just email those.

If you _really_ want to just create a patch, you can run 'git fetch origin;
git diff origin/master... > feature.patch', though that is the hardest on
the maintainer, since it does not contain parentage like the other ways do.
It will get stale easily, as patch files do.  The other methods tell Git
what commits your patch/es were based on and so can help Git do more
effective 3-way merges, keeping the changes from getting stale and not
applying over a short time.

You can also just use 'diff' but it has the same problems as the 'git diff'
solution - the patches become stale and are more difficult to apply for the
maintainer.  Plus it's even more work for you than 'git diff' since I think
you would need a second clone to diff against.

I think you'll want to open a ticket in Lighthouse as well and reference the
branch on GitHub (ie: 'schacon/my-fix') so Aslak can track and close the
appropriate ticket when necessary.

Hope that's helpful.  Btw, if you haven't forked cucumber on GitHub yet, and
your work was on a public clone of the main project, you can contribute by
hitting the 'fork' button on the cucumber project on GitHub while logged in,
then taking the 'Your Clone Url' and running this in your project:

$ git remote add github [address removed]:schacon/cuc­umber.git

Then pushing your work to a remote branch for Aslak like this:

$ git push github master:my-fix

That will push the work in your 'master' branch to the 'my-fix' branch on
your fork on GitHub.  Then hit the 'pull request' button.


Please Note: If you hit "REPLY", your message will be sent to everyone on
this mailing list ([address removed]) http://ruby.meetu...­ This
message was sent by Scott Chacon ([address removed]) from The East Bay Ruby
Meetup Group.
To learn more about Scott Chacon, visit his/her member profile:
To unsubscribe or to update your mailing list settings, click here:
Meetup Support: [address removed]
632 Broadway, New York, NY 10012 USA

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy