From: Joshua Jensen <jjensen@workspacewhiz.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Coping with the pull-before-you-push model
Date: Thu, 09 Sep 2010 08:43:53 -0600 [thread overview]
Message-ID: <4C88F2A9.2080306@workspacewhiz.com> (raw)
In-Reply-To: <AANLkTikY55ZJvSTqyFKLqwABqnJZuODz3yrc7CFvQf0K@mail.gmail.com>
----- Original Message -----
From: Ævar Arnfjörð Bjarmason
Date: 9/9/2010 7:06 AM
> On Thu, Sep 9, 2010 at 04:47, Joshua Jensen<jjensen@workspacewhiz.com> wrote:
>> After a deployment of Git on a centralized server at my place of business,
>> the largest amount of grumbling has been with the pull-before-you-push
>> model. Coming from the file-centric Perforce where you need only have
>> latest of just the files you are submitting, the pull-before-you-push model
>> has really been a pain in the neck for a large team.
>>
>> Even with topic branches being used, merges to master occur frequently. It
>> can really be a frustrating battle to get your merged branch pushed to the
>> central master branch. In the time it took you to pull, test, and push,
>> someone has probably already pushed before you. To cope with this, people
>> will pull, not bother testing, and immediately push their changes. Yes,
>> this could result in build instability, but it is considered better than
>> never being able to make your change live.
>>
>> (Let's ignore what we should or shouldn't be doing as far as 'development
>> practices'. :) We're solving the problems one step at a time...)
> Let's not ignore that.
Fair.
> Presumably you had exactly the same problem in perforce, i.e. because
> you only had have the files you were changing checked out in Perforce
> in the time between `hack&& pull&& test&& push` someone else might
> have already pushed. Thus what you just submitted wasn't guaranteed to
> pass tests.
>
> So is the flow in Git where you don't run the tests again, rebase and
> push and hope for the best any different?
The end result is the same; submitted code is never really tested
against latest in Perforce either. The primary difference between the
two is that the Perforce submit is successful the majority of the time
(odds of someone editing and submitting the same file as you are low),
and the Git push fails the majority of the time.
Don't get me wrong. I've given training on why Git's enforced
pull-before-you-push model can be better than what we had before
(reproducible state, fewer broken builds, etc). Nevertheless, the issue
is very frequent, and that's why I am querying others.
>> Gerrit provides a compelling model where branches are pushed to the code
>> review server in the form refs/for/master, and the given push will always
>> succeed. Code reviews are performed, someone sets the verified bit, and the
>> change is submitted and merged to master by Gerrit itself in a queued
>> fashion. Unfortunately, its general "requirement" to squash your branch
>> down to a single commit is, possibly, a showstopper. If it treated a branch
>> merge as a group of commits that MUST stay together, that would be perfect.
> This sounds like something that's configurable in Gerrit, or should
> be.
Agreed, but it appears it is currently a missing feature. There have
been discussions about it on their mailing list over the past months,
and a feature request is in their tracker. I am unsure of their
progress or even interest.
>> [..]
>>
>> Is there another workflow that is successful for your large(-ish) enterprise
>> team?
> Linux manages to deal with a huge number of commits, but does so by
> having subsystems.
>
> Maybe that's something you can use in your codebase?
Unless I'm mistaken, though, it seems to work in reverse of what our
working model has been for years.
I'm grossly oversimplifying the process, but the Linux model seems to be
built on hierarchical 'pull requests'. I can tell a subsystem
maintainer I have some changes and then ask that maintainer to pull them
from a certain location. When that person has time/inclination, the
change is pulled, merged in, and then another pull request is sent to
the upstream hierarchy.
This _is_ compelling, but even if it would work within the company I
work for, it is such a dramatic shift in workflow that I am certain it
could not be done in one fell swoop.
Thanks for your insights!
Josh
next prev parent reply other threads:[~2010-09-09 14:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-09 4:47 Coping with the pull-before-you-push model Joshua Jensen
2010-09-09 13:06 ` Ævar Arnfjörð Bjarmason
2010-09-09 14:43 ` Joshua Jensen [this message]
2010-09-10 5:35 ` Jon Seymour
2010-09-10 14:15 ` Jeff King
2010-09-14 4:47 ` Joshua Jensen
2010-09-14 5:24 ` Jeff King
2010-09-14 5:59 ` Avery Pennarun
2010-09-15 21:59 ` David Brown
2010-09-14 12:12 ` Theodore Tso
2010-09-14 15:51 ` Joshua Jensen
2010-09-14 16:24 ` Eugene Sajine
2010-09-14 16:49 ` Ted Ts'o
2010-09-14 4:37 ` Joshua Jensen
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=4C88F2A9.2080306@workspacewhiz.com \
--to=jjensen@workspacewhiz.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.