git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: Kernel nightly snapshots..
Date: Thu, 5 May 2005 09:40:23 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0505050846530.2328@ppc970.osdl.org> (raw)
In-Reply-To: <1115307033.16187.146.camel@hades.cambridge.redhat.com>



On Thu, 5 May 2005, David Woodhouse wrote:
> 
> Eep. That'll be a whole lot more useful if I do
> 	cg-diff -r $RELTREE:$CURTREE
> instead of 
> 	cg-diff -r $CURTREE:$RELTREE
> ... but it should be OK now. This is the md5sum of the correct one:
> 
> 21a0ee13c539e8b016682c1542bb9167  patch-2.6.12-rc3-git1.gz

Btw, if you want to, you could simplify and optimize things heavily by 
doign some very specific git internal mucking around, and using the new 
"-m" flag I added to "git-diff-cache".

The "-m" flag says that a file that isn't checked out will always match 
the cache, which means that you can create your magic diffs that modify 
the Makefile with something like this:

	export SNAP_TAG_DIRECTORY=/pub/linux/kernel/v2.6/snapshots/tags
	export BASE_DIRECTORY=/pub/scm/linux/kernel/git/torvalds/linux-2.6
	export SHA1_FILE_DIRECTORY=$BASE_DIRECTORY/objects

	RELNAME=`ls $BASE_DIRECTORY/refs/tags | tail -1`
	RELCOMM=`cat $BASE_DIRECTORY/refs/tags/$RELNAME`
	CURCOMM=`cat $BASE_DIRECTORY/HEAD`

	SNAPNAME=`ls $SNAP_TAG_DIRECTORY | grep -- "$RELNAME-git" | tail -1`
	if [ "$SNAPNAME" ]; then
		SNAPCOMM=`cat $SNAP_TAG_DIRECTORY/$SNAPNAME`
		[ "$SNAPCOMM" == "$CURCOMM" ] && exit 0
		OLDGITNUM=`echo $SNAPNAME | sed s/^.*-git//`
		NEWGITNUM=`expr $OLDGITNUM + 1`
		CURNAME="$RELNAME-git$NEWGITNUM"
	else
		CURNAME="$RELNAME-git1"
	fi

	EXTRAVERSION=-`echo $CURNAME | cut -f2- -d-`

	rm -rf tmp-empty-tree
	mkdir -p tmp-empty-tree/.git
	( cd tmp-empty-tree
	  git-read-tree $CURCOMM
	  git-checkout-cache Makefile
	  perl -pi -e "s/EXTRAVERSION =.*/EXTRAVERSION = $EXTRAVERSION/" Makefile
	  git-diff-cache -m -p $RELCOMM ) | gzip -9 > patch-$CURNAME.gz

	echo CURCOMM > $SNAP_TAG_DIRECTORY/$CURNAME

but it's entirely untested, and only written in my mail editor, so..

Anyway, here's explaining what it does:

 - it creates a new "tmp-empty-tree" thing, and points the object database 
   to _my_ tree (which is unwritable for you, but you don't care, you just
   want to read it)

 - it picks up my last tag as the release, and your last git tag from your 
   private snapshot tag directory as the last git thing. Then it takes my 
   current HEAD as the new thing to diff.

 - we read that current tree into this empty tree, but we don't check any
   of it out except for the Makefile. So the "tmp-empty-tree" should 
   literally just have the files "Makefile" and ".git/index" in it.

 - we edit the Makefile, and then we do "git-diff-cache -m -p" between the 
   result and the old base.

This _should_ work. Modulo bugs. And it should be reasonably efficient. It 
just needs my current git tree as of five minutes ago..

		Linus

  reply	other threads:[~2005-05-05 16:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-05  0:28 Kernel nightly snapshots Linus Torvalds
2005-05-05  2:06 ` H. Peter Anvin
2005-05-05 14:38   ` David Woodhouse
2005-05-05 14:44     ` Linus Torvalds
2005-05-05 15:10       ` David Woodhouse
2005-05-05 15:30         ` David Woodhouse
2005-05-05 16:40           ` Linus Torvalds [this message]
2005-05-07 12:39             ` David Woodhouse
2005-05-06  0:28           ` H. Peter Anvin
2005-05-06  7:29             ` David Woodhouse
2005-05-06 21:50               ` H. Peter Anvin
2005-05-06 21:51                 ` Marcelo Tosatti
2005-05-22 11:50                   ` Thomas Glanzmann
2005-05-22 11:59                     ` David Woodhouse
2005-05-22 12:09                       ` Thomas Glanzmann
2005-05-22 17:01                         ` Russell King
2005-05-05 15:46         ` Linus Torvalds
2005-05-06  7:42           ` David Woodhouse

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0505050846530.2328@ppc970.osdl.org \
    --to=torvalds@osdl.org \
    --cc=dwmw2@infradead.org \
    --cc=git@vger.kernel.org \
    --cc=hpa@zytor.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).