public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Andrew Morton <akpm@linux-foundation•org>
Cc: linux-next@vger•kernel.org, Prarit Bhargava <prarit@redhat•com>,
	David Howells <dhowells@redhat•com>,
	KOSAKI Motohiro <kosaki.motohiro@jp•fujitsu.com>,
	LKML <linux-kernel@vger•kernel.org>,
	linux-ia64 <linux-ia64@vger•kernel.org>,
	Sam Ravnborg <sam@ravnborg•org>, Kyle McMartin <kyle@mcmartin•ca>,
	Tony Luck <tony.luck@intel•com>,
	Trond Myklebust <trond.myklebust@fys•uio.no>
Subject: Re: linux-next: build problem with nfs tree (Was: Re: [mmotm][PATCH] fix ia64 build error)
Date: Fri, 16 Jan 2009 15:34:17 +1100	[thread overview]
Message-ID: <20090116153417.891297ca.sfr@canb.auug.org.au> (raw)
In-Reply-To: <20090116134930.68e783aa.sfr@canb.auug.org.au>

Hi Andrew,

On Fri, 16 Jan 2009 13:49:30 +1100 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> On Thu, 15 Jan 2009 17:59:17 -0800 Andrew Morton <akpm@linux-foundation•org> wrote:
> >
> > I do most of my gitting across a DSL connection.  It makes GUIs
> > painful.
> 
> Yeah, I will think on it ...

With the help of Paul Mackerras, I have come up with the shell script
below.  You run it with the commit id, the tag of the tree you care
about (e.g. next-20080115)(it defaults to the current top of tree) and
the name of the branch the represents Linus' tree (default to
origin/master).  It will spit out the (or a) tree that contains the
commit you asked about.

-------------------------------------------------------------------------
#!/bin/bash

commit=$1
[ "$commit" ] || {
	echo "$0: <commit id> [<top tag> [<linus branch>]]" 1>&2
	exit 1
}

top=$2
[ "$top" ] || top=HEAD

linus=$3
[ "$linus" ] || linus=origin/master

base=$(git merge-base "$linus" "$top")

git log --first-parent --pretty='format:%H %P' "$base".."$top" |
while read m p1 p2
do
	[ "$p2" ] || continue
	git rev-list $base..$p2 | grep -q "$commit" || continue
	branch=$(git show $m | sed -n "s/[ 	]*Merge .* '\([^']*\)'/\1/p")
	tree=${branch%%/*}
	[ "$tree" = "quilt" ] && tree=${branch##*/}
	echo "$tree"
	break
done

exit 0
----------------------------------------------------------------------------
-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

  parent reply	other threads:[~2009-01-16  4:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090115200315.EBE3.KOSAKI.MOTOHIRO@jp.fujitsu.com>
     [not found] ` <20090115093514.f3f6b8ff.akpm@linux-foundation.org>
2009-01-16  1:49   ` linux-next: build problem with nfs tree (Was: Re: [mmotm][PATCH] fix ia64 build error) Stephen Rothwell
2009-01-16  1:59     ` Andrew Morton
2009-01-16  2:49       ` Stephen Rothwell
2009-01-16  3:41         ` KOSAKI Motohiro
2009-01-16  4:34         ` Stephen Rothwell [this message]
2009-01-16 22:15           ` Andrew Morton
2009-01-16 22:40             ` Stephen Rothwell
2009-01-16 22:49               ` Stephen Rothwell
2009-01-16 22:51               ` Andrew Morton
2009-01-17  4:43         ` David Howells
2009-01-17  5:00           ` Stephen Rothwell

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=20090116153417.891297ca.sfr@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=dhowells@redhat$(echo .)com \
    --cc=kosaki.motohiro@jp$(echo .)fujitsu.com \
    --cc=kyle@mcmartin$(echo .)ca \
    --cc=linux-ia64@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=prarit@redhat$(echo .)com \
    --cc=sam@ravnborg$(echo .)org \
    --cc=tony.luck@intel$(echo .)com \
    --cc=trond.myklebust@fys$(echo .)uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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