git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Haberman <stephen@exigencecorp.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: "R. Tyler Ballance" <tyler@slide.com>,
	Nanako Shiraishi <nanako3@lavabit.com>,
	git@vger.kernel.org
Subject: Re: Forcing --no-ff on pull
Date: Wed, 10 Dec 2008 13:07:38 -0600	[thread overview]
Message-ID: <20081210130738.0662082f.stephen@exigencecorp.com> (raw)
In-Reply-To: <alpine.LNX.1.00.0812091651360.19665@iabervon.org>

On Tue, 9 Dec 2008 17:32:36 -0500 (EST)
Daniel Barkalow <barkalow@iabervon.org> wrote:

> > At this point, QA is involved and what can happen is that QA realizes
> > that this code is *not* stable and *never* should have been brought into
> > the stable branch.
>
> How do you prevent the (IMHO more likely) case of:
> 
> % git checkout -b project
> % git checkout stable
> <fix some bug in stable>
> % git commit -a
> <forget to switch branches back>
> <work>
> % git commit -am "A"
> <work>
> % git commit -am "B"
> ...
> % git push origin stable
> 
> That is, the developer makes a whole bunch of inappropriate commits on 
> their stable branch instead of their project branch and then pushes it out 
> (perhaps as part of a push rule, or thinking only the bug fix went there). 
> I suspect that "pull" step there isn't the point where things are going 
> wrong.

Well, two things:

1) The hook script at [1] really would prevent this from getting published.
   Although it only looks for "stable"--if you have per-team stable branches,
   you might need to match on "*-stable" or something like that. But it does
   (copy/paste from [1]):

# * stable must move by only 1 commit-per-push
# * the stable commit must have 2 and only 2 parents
#   * The first parent must be the previous stable commit
#   * The second parent is the tip of the candidate branch being released
# * the stable commit must have the same contents as the candidate tip
#   * Any merge conflicts should have been resolved in the candidate tip
#     by pulling stable into the candidate and having qa/tests done--pulling
#     candidate into stable should then apply cleanly

So, no fast forwards, no direct commits, only "good"/empty merges of
topic branches can move stable. Anything else is rejected and LazyDev
has to try again.

2) As far as "pull" isn't where things are going wrong, that is not
   entirely true, as even with the server-side enforcement like [1],
   I think you'd still like to help LazyDev out and have `git pull`
   "just work" for your given setup. Especially if you don't have full
   management buy-in to git, pacifying LazyDev's can be necessary.

- Stephen

1: http://github.com/stephenh/gc/tree/master/server/update-stable

      reply	other threads:[~2008-12-10 19:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-09  9:34 Forcing --no-ff on pull R. Tyler Ballance
2008-12-09  9:46 ` Jakub Narebski
2008-12-09  9:49 ` Lars Hjemli
2008-12-09 10:12   ` R. Tyler Ballance
2008-12-09 10:31     ` Lars Hjemli
2008-12-09 10:45       ` R. Tyler Ballance
2008-12-09 10:57         ` Lars Hjemli
2008-12-09 16:39     ` Stephen Haberman
2008-12-09 10:00 ` Johannes Sixt
2008-12-09 10:17 ` Nanako Shiraishi
2008-12-09 10:38   ` R. Tyler Ballance
2008-12-09 10:57     ` Jeff King
2008-12-09 14:36     ` Boyd Stephen Smith Jr.
2008-12-09 22:32     ` Daniel Barkalow
2008-12-10 19:07       ` Stephen Haberman [this message]

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=20081210130738.0662082f.stephen@exigencecorp.com \
    --to=stephen@exigencecorp.com \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=nanako3@lavabit.com \
    --cc=tyler@slide.com \
    /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).