Git development
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Git Mailing List <git@vger.kernel.org>
Subject: "checkout-cache" update
Date: Thu, 21 Apr 2005 10:40:31 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0504211027500.2344@ppc970.osdl.org> (raw)


I just pushed out this very useful thing to "checkout-cache", which is 
best just described by its commit log:

  Add the ability to prefix something to the pathname to "checkout-cache.c"
  
  This basically makes it trivial to use checkout-cache as a "export as
  tree" function. Just read the desired tree into the index, and do a
  
        checkout-cache --prefix=export-dir/ -a
  
  and checkout-cache will "export" the cache into the specified directory.
  
  NOTE! The final "/" is important. The exported name is literally just
  prefixed with the specified string, so you can also do something like
  
        checkout-cache --prefix=.merged- Makefile
  
  to check out the currently cached copy of "Makefile" into the file
  ".merged-Makefile".

Basically, I can do a a "git-0.6" release with a simple

	checkout-cache --prefix=../git-0.6/ -a

which basically says: check out all files, but use the prefix 
"../git-0.6/" before the filename when you do so.

Then I just do

	cd ..
	tar czvf git-0.6.tar.gz git-0.6

and I'm done. Very cool, very simple, and _extremely_ fast.

Doing the tree export (not the tar) for the whole kernel takes two minutes
in the cold-cache case (not so wonderful, but acceptable), and 4.6
_seconds_ in the hot-cache case (pretty damn impressive, I say).

(The compressng tar then takes about 20 seconds for me, and that's
obviously all from the cache, since I just wrote it out).

NOTE! The fact that the '/' at the end of the --prefix= thing is 
meaningful can be very confusing, I freely admit. But it does end up being 
potentially quite useful, and you're likely to script usage of this anyway 
into "git export" or something, so...

		Linus

                 reply	other threads:[~2005-04-21 17:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.LNX.4.58.0504211027500.2344@ppc970.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox