git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: Kernel headers git tree
Date: Fri, 14 Jul 2006 01:56:01 +0100	[thread overview]
Message-ID: <1152838562.31372.58.camel@shinybook.infradead.org> (raw)
In-Reply-To: <7v4pxlt3xg.fsf@assigned-by-dhcp.cox.net>

On Thu, 2006-07-13 at 17:39 -0700, Junio C Hamano wrote:
> With modern enough git, you can rewrite
>         KBUILDSHA=`git ls-tree $TREE -- Kbuild | cut -f3 -d\  | cut -f1`
> with
>         KBUILDSHA1=`git rev-parse $TREE:Kbuild`


Aha. Thanks.

> I am not sure what function incparent() is trying to do with
> this:
> 
>         git rev-list --max-count=1 --topo-order $1 -- . 

Find the latest ancestor commit which actually changed any files. The
first script has a similar line, except that it finds the latest
ancestor which changed anything in include/

Consider a kernel tree with commits A-->B-->C-->D, of which only A and C
change anything in include/ and in fact only C actually changes the
_exported_ headers after the unifdef and sed bits. 

The first script (extract-khdrs-git.sh) creates a 'stage1' branch which
only contains commits A'-->C', with the _exported_ header tree for each.

The second script (extract-khdrs-stage2.sh) then creates the master
branch with the same tree objects, but omitting the commits which don't
change anything. So it contains only commit C''

For an example of this, compare
http://git.kernel.org/git/?p=linux/kernel/git/dwmw2/kernel-headers.git
with
http://git.kernel.org/git/?p=linux/kernel/git/dwmw2/kernel-headers.git;a=shortlog;h=stage1

Btw, git-rev-list is _very_ slow at this. Even when the output is
actually HEAD, it takes my 2.3GHz G5 a _long_ time to give a result:

pmac /pmac/git/linux-2.6 $ git-rev-parse HEAD
ab6cf0d0cb96417ef65cc2c2120c0e879edf7a4a
pmac /pmac/git/linux-2.6 $ time git-rev-list --max-count=1 --topo-order HEAD -- include
ab6cf0d0cb96417ef65cc2c2120c0e879edf7a4a

real    0m18.840s

Is there a better way to do that step?

-- 
dwmw2

  reply	other threads:[~2006-07-14  0:55 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-13 23:59 Kernel headers git tree David Woodhouse
2006-07-14  0:39 ` Junio C Hamano
2006-07-14  0:56   ` David Woodhouse [this message]
2006-07-14  1:08     ` Linus Torvalds
2006-07-14  2:37     ` Junio C Hamano
2006-07-14  1:05   ` Linus Torvalds
2006-07-14  1:27     ` David Woodhouse
2006-07-14  5:16       ` Linus Torvalds
2006-07-14 10:23         ` David Woodhouse
2006-07-14 15:57           ` Linus Torvalds
2006-07-14 17:51             ` Daniel Barkalow
2006-07-14 17:58               ` David Woodhouse
2006-07-14 18:21                 ` Daniel Barkalow
2006-07-14  5:52       ` Linus Torvalds
2006-07-14  9:38         ` David Woodhouse
2006-07-14 15:39           ` Linus Torvalds
2006-07-17 22:34             ` [PATCH] Trivial path optimization test Alex Riesen
2006-07-24  6:41               ` Junio C Hamano
2006-07-24 23:23                 ` Alex Riesen
2006-07-24 23:23             ` Alex Riesen
2006-07-14 18:01           ` Kernel headers git tree Junio C Hamano
2006-07-14 18:21             ` David Woodhouse
2006-07-14  7:20 ` Ian Campbell
2006-07-14  7:52   ` Junio C Hamano
2006-07-14 18:05 ` Ingo Oeser
2006-07-14 18:16   ` David Woodhouse
2006-07-18 21:15     ` Ingo Oeser

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=1152838562.31372.58.camel@shinybook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.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).