From: Nico Williams <nico@cryptonector.com>
To: Mike Stump <mikestump@comcast.net>
Cc: git discussion list <git@vger.kernel.org>
Subject: Re: Rebase safely (Re: cherry picking and merge)
Date: Fri, 8 Aug 2014 13:27:36 -0500 [thread overview]
Message-ID: <20140808182735.GC21575@localhost> (raw)
In-Reply-To: <894B9D26-F8C5-4C82-B04C-3B31094C2293@comcast.net>
On Fri, Aug 08, 2014 at 10:34:43AM -0700, Mike Stump wrote:
> On Aug 6, 2014, at 10:11 PM, Nico Williams <nico@cryptonector.com> wrote:
> > Nah. Sun managed this for decades without a hitch, and for products
> > much larger than GCC. See above.
>
> Ok. Ah, ok, perfect. I see how that method of working would cure the
> cherry-pick and merge don’t work problem mentioned at the top of the
> thread.
>
> > Do some experiments based on the above hardcopy. If that doesn't
> > convince you that it works, oh well, I'll have given it a good try.
>
> Thank you for taking the time to diagram that as it appears to violate
> everyones how to use git guide. I see the workflow does an onto,
> which was the ‘fix’ people talked about on stack overflow, and I see
> just how things would work.
There's nothing scary about --onto. You're saying "figure out which are
my local commits (the ones on top of the previous upstream) and pick
them onto the new upstream".
We only need to do it manually (though it can be scripted[*]) because
git doesn't track rebase history so that it can be done automatically.
[*] And then there's Tony Finch's
https://git.csx.cam.ac.uk/x/ucs/git/git-repub.git , which is kinda
awesome!
> If the old master branches are deleted and gc is run, then all the old
> references go away, and then the refs from email and bugzilla then
> don’t work. Did you guys ever remove them and then prune (or gc)?
Product gates' repos and snapshots stuck around forever, though it was
Teamware, and finding really old ones wasn't necessarily easy,
particularly since their names didn't always reflect product names.
Prominent project gate repos and their snapshots also stuck around
forever.
Lesser project gate repos tended to be as ephemeral as the project.
> Now, the biggest issue, if that is recognized as `fixing’ the
> cherry-pick problem, then certainly the problem is understood to be a
> problem. If one recognized it as a problem, then one can envision
Not really. This isn't about git. We followed a rebase-only workflow
with VCSes that nominally didn't support rebase. We did it because it
was easier on everyone and kept history in the upstream clean. We
didn't do it because git has issues when combining merge and
cherry-pick.
> cherry-pick and merge working together so that the problem doesn’t
> need fixing in the first place. And, if it doesn’t need fixing, then
If you buy into the Sun model then this is all a non-issue. If you
don't then I think you have other problems (because I have bought into
the Sun model) :)
> the cost of the solution isn’t needed either. The biggest problem
> with git, is that two features don’t work nicely together when they
> [...]
The Sun model has no additional cost. It moves costs around so that the
people dealing with conflicts are the downstreams, not the upstreams,
and that's exactly as it should be.
(Keep in mind that Solaris gates tended to have large numbers of commits
on any given day, so it was quite common that one would have to rebase
multiple times before successfully pushing. For large projects with
long test cycles the gates would close to avoid the need to rebase and
re-test.)
> I still favor fixing the underlying problem with cherry-pick and merge
> not working. :-) That said, I see how to work around the bug with
> rebase, if I need to.
IMO it could be done, but I can't help that.
> I wish the top google hit were your guide and I wish I never saw all
> the other pages… I see now your position, and I see why all the
Me too! I should blog it.
> guides are wrong, if you know just how to use rebase. I wish the git
> documentation were improved to say as the first sentence under
The Sun model is not the only way to use git though.
> cherry-pick, this feature sucks and doesn’t really work well, it can
> cause excess merge conflicts. rebase can be used to work around the
> bugs in cherry-pick for now. And under rebase, instead of saying what
> it said now, that how one can can trivially and effortlessly use git,
> instead of saying, Do not rebase commits that you have pushed to a
> public repository which I now see is wrong.
I'm glad you understand the Sun model now. You should evaluate its
applicability to your use case on its own merits. Don't use it just to
workaround a problem in git; use it because it's good, or don't use it
because it doesn't fit your team's needs.
Nico
--
next prev parent reply other threads:[~2014-08-08 18:27 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-01 0:58 cherry picking and merge Mike Stump
2014-08-01 2:43 ` brian m. carlson
2014-08-01 16:27 ` Jakub Narębski
2014-08-01 17:48 ` Mike Stump
2014-08-01 18:57 ` Philip Oakley
2014-08-01 22:10 ` Mike Stump
2014-08-02 10:39 ` Philip Oakley
2014-08-02 16:29 ` Philip Oakley
[not found] ` <CANQwDwc4YPdK+a0Oc-jWPTRyM5GiP-CMuRY1inxJY41GwUGBvQ@mail.gmail.com>
2014-08-01 19:01 ` Fwd: " Jakub Narębski
2014-08-01 22:24 ` Mike Stump
2014-08-02 11:44 ` Philip Oakley
2014-08-06 15:43 ` Jakub Narębski
2014-08-06 18:41 ` Mike Stump
2014-08-01 20:12 ` Sam Vilain
2014-08-01 23:06 ` Mike Stump
2014-08-01 23:40 ` Nico Williams
2014-08-02 0:18 ` Alex Davidson
2014-08-06 19:11 ` Mike Stump
2014-08-06 19:44 ` Rebase safely (Re: cherry picking and merge) Nico Williams
2014-08-06 20:13 ` Nico Williams
[not found] ` <A769B84E-42D1-44AC-B0A8-0F4E68AB71FB@comcast.net>
2014-08-07 5:11 ` Nico Williams
2014-08-08 17:34 ` Mike Stump
2014-08-08 18:27 ` Nico Williams [this message]
2014-08-08 16:23 ` Fwd: " Mike Stump
2014-08-01 16:56 ` cherry picking and merge Mike Stump
2014-08-21 17:36 ` Keller, Jacob E
2014-08-21 17:58 ` Keller, Jacob E
2014-08-01 19:22 ` Nico Williams
2014-08-01 22:13 ` Mike Stump
2014-08-01 22:19 ` Nico Williams
2014-08-01 20:02 ` Jonathan Nieder
2014-08-01 20:50 ` Jonathan Nieder
2014-08-01 20:55 ` Nico Williams
2014-08-01 21:44 ` Junio C Hamano
2014-08-01 22:00 ` Nico Williams
2014-08-01 22:09 ` Junio C Hamano
2014-08-06 15:58 ` Jakub Narębski
2014-08-06 16:26 ` Nico Williams
2014-08-06 23:16 ` Junio C Hamano
2014-08-06 23:20 ` Junio C Hamano
2014-08-01 23:47 ` Mike Stump
2014-08-01 22:35 ` Mike Stump
2014-08-01 22:42 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140808182735.GC21575@localhost \
--to=nico@cryptonector.com \
--cc=git@vger.kernel.org \
--cc=mikestump@comcast.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).