All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Chris Wright <chrisw@sous-sol.org>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [RFC] new -stable tag variant, Git workflow question
Date: Thu, 19 Nov 2009 10:15:16 -0800	[thread overview]
Message-ID: <20091119181516.GA3621@suse.de> (raw)
In-Reply-To: <1258042317.2760.103.camel@mulgrave.site>

On Thu, Nov 12, 2009 at 10:11:57AM -0600, James Bottomley wrote:
> On Wed, 2009-11-11 at 20:41 -0800, Greg KH wrote:
> > On Wed, Nov 11, 2009 at 12:50:24PM -0600, James Bottomley wrote:
> > > On Tue, 2009-11-10 at 11:37 -0800, Greg KH wrote:
> > > > On Tue, Nov 10, 2009 at 09:29:48AM -0500, James Bottomley wrote:
> > > > > On Mon, 2009-11-09 at 20:14 -0800, Greg KH wrote:
> > > > > > > A further question is, i can see using this tagging scheme in the future 
> > > > > > > in merge commits log messages too - will your scripts notice that too?
> > > > > > 
> > > > > > Hm, I don't think we look at merges as there's nothing there to actually
> > > > > > commit.
> > > > > > 
> > > > > > > For example if there's a few commits left in tip:*/urgent branches 
> > > > > > > (tip:sched/urgent, tip:core/urgent, tip:x86/urgent, etc.) by the time 
> > > > > > > v2.6.32 is released, i will then merge them into tip:sched/core, 
> > > > > > > tip:core/core, tip:x86/core, etc. - and i could use the merge commit as 
> > > > > > > a notification area to 'activate' them for -stable backporting via a 
> > > > > > > merge commit.
> > > > > > > 
> > > > > > > This is how such merge commits would look like:
> > > > > > > 
> > > > > > >   Merge branch 'core/urgent' into core/rcu
> > > > > > > 
> > > > > > >   Merge reason: Pick up urgent fixes that did not make it into .32.0
> > > > > > > 
> > > > > > >   Cc: <stable@kernel.org> # .32.x: 83f5b01: rcu: Fix long-grace-period race
> > > > > > >   Signed-off-by: Ingo Molnar <mingo@elte.hu>
> > > > > > > 
> > > > > > > This is not so rare of a situation as it might seem - for the trees i 
> > > > > > > maintain it happens in almost every release cycle - i typically skip 
> > > > > > > urgent branch merges after -rc8/-rc9, unless they are very-very-urgent 
> > > > > > > fixes - but they'd still be eligible for -stable.
> > > > > > 
> > > > > > Ok, that would be good and fine with me.
> > > > > > 
> > > > > > James, would your script pick this up, or does it need to also pay
> > > > > > attention to merge commits?
> > > > > 
> > > > > No ... because merge commits should effectively be empty (and when
> > > > > they're not you can't generate an applyable diff).  If I understand the
> > > > > workflow, the desire is to have the whole branch sent to stable by
> > > > > tagging the merge commit.  That's possible ... it's exactly the same
> > > > > logic I use in the commit scripts for the SCSI tree, so it should be
> > > > > possible to extract the logic.
> > > > > 
> > > > > By the looks of the above it's only a few commits, or is it the entire
> > > > > branch?
> > > > 
> > > > I'm thinking the commit would be the merge, right Ingo?  So it would
> > > > just be a single commit that has the marker in it.
> > > 
> > > OK, so I can make it send you this just by removing the --no-merge flag
> > > from the git rev-list the script uses to sift through what changed
> > > (which I've already done).
> > > 
> > > The slight problem is that further down, to generate the patch the
> > > script uses git format-patch -k --stdout commit^..commit.  For a merge
> > > commit, this will generate a patch equivalent to the entire branch that
> > > was merged, even though the commit message will only pick out some of
> > > these ... is this OK?
> > > 
> > > If not, I can look at using git show instead to generate the patches (it
> > > will effectively generate null diffs for merge points with the stable
> > > tag, which is closer to what you want).
> > > 
> > > Alternatively, if you pick up the commits from Linus' tree anyway, I
> > > could just stop producing diffs, which will save email bandwidth and
> > > then be automatically correct whether the commit is a merge or not.
> > 
> > No, I'd like to keep diffs, and use Linus's suggestion to get the
> > correct diff, I have had that same bug in some scripts I have written as
> > well.
> 
> OK, so git show --pretty=email -u --stat -M --cc <commit>
> 
> seems to be what works well (the options are -u to generate diff plus
> stats, -M to detect renames and --cc to try to generate a diff for merge
> points showing if there have been non trivial fix ups).
> 
> I've attached a sample below of what it will look like for a stable
> tagged merge point.  As you can see, because this is a simple merge, the
> diff is empty.

Looks great to me, thanks for doing this.

greg k-h

      reply	other threads:[~2009-11-19 18:18 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-10  3:48 [RFC] new -stable tag variant, Git workflow question Ingo Molnar
2009-11-10  4:14 ` Greg KH
2009-11-10  4:20   ` Ingo Molnar
2009-11-10 14:30     ` James Bottomley
2009-11-10 17:22       ` Ingo Molnar
2009-11-10 17:53         ` Linus Torvalds
2009-11-10 18:06           ` Ingo Molnar
2009-11-10 14:29   ` James Bottomley
2009-11-10 15:52     ` Stefan Richter
2009-11-10 19:12       ` Chris Friesen
2009-11-10 21:20         ` Ingo Molnar
2009-11-10 19:39       ` Greg KH
2009-11-10 20:45         ` Ingo Molnar
2009-11-10 21:11           ` Junio C Hamano
2009-11-10 21:25             ` Greg KH
2009-11-10 21:29             ` Ingo Molnar
2009-11-10 19:37     ` Greg KH
2009-11-10 20:39       ` Ingo Molnar
2009-11-11 18:50       ` James Bottomley
2009-11-11 20:00         ` Linus Torvalds
2009-11-11 20:06           ` James Bottomley
2009-11-11 20:14             ` Linus Torvalds
2009-11-11 21:43               ` H. Peter Anvin
2009-11-11 21:52                 ` Linus Torvalds
2009-11-12  7:45                   ` Ingo Molnar
2009-11-12 15:15                     ` H. Peter Anvin
2009-11-12 17:01                       ` David Dillow
2009-11-12 19:50                         ` H. Peter Anvin
2009-11-12 14:41                   ` James Bottomley
2009-11-12  4:41         ` Greg KH
2009-11-12 16:11           ` James Bottomley
2009-11-19 18:15             ` Greg KH [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=20091119181516.GA3621@suse.de \
    --to=gregkh@suse.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=chrisw@sous-sol.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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.