Re: git branch --switch?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, 17 Apr 2007, Rene Herman wrote:

> On 04/17/2007 05:41 PM, Rene Herman wrote:
> 
> > You'd be quite right in saying that there isn't much point; if I want to now
> > start populating branch a, I have to "git checkout a" anyway, and that
> > action _will_ now be instantaneous.
> 
> Actually, I take that back, it's not instantaneous at all. 1995 systems are
> much better at showing long delays than those fancy modern computers are!

You'll always have at least _one_ slow checkout. If you checkout at all.

The kernel archive is 8 million lines - 240MB or so checked out. Writing 
out that 240 MB to disk is not going to be instantaneous even on a modern 
machine, although having so much memory that you can ignore the writeout 
and let it happen in the background will certainly help.

If you don't need to build the tree, you can avoid the checkout entirely, 
of course. Most git operations don't actually need a checked-out tree at 
all, and you could even have done a bare clone and just inspected it with 
git tools if that's what is wanted.

So you could have avoided the checkout completely, and done

	git clone -l -s -n <a local linux repo> local
	git branch v20 v2.6.20
	git branch a v20
	git branch b v20
	git branch c v20

and now you'd have four branches that all point to the v20 thing, and none 
of them are actually checked out. And all of that would have been 
instantaneous, even on an old machine (apart fromt he clone itself, of 
course ;)

But the moment you decide to write 240MB to disk, you'll be slow.

			Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]