Thread (31 messages) 31 messages, 10 authors, 2016-06-15

Re: several quick questions

flat view

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:19


On Tue, 14 Feb 2006, Carl Worth wrote:
Oh, I'm blind. I didn't see git-checkout-index, (thanks Kenneth for
mentioning it elsewhere in the thread). So now I've at least got the
recipe I was after:

	git-read-tree <revision>
	git-update-index --replace
	git-checkout-index -a -f -u
This is very very inefficient, because it will replace the old 
index without using the (valid) information that is there from before. 
Resulting in a lot of unnecessary IO..

You may not care for a small project, but for bigger stuff, you're better 
off using more subtle approaches.

Explore using "git-read-tree --reset <revision>" or, perhaps even more 
interesting is "git-read-tree -u -m <oldrev> <newrev>"
And I think that would make for a dandy command to have in git. Any
suggestions for a name?
I'd suggest "git reset" as a cool way to say that it "resets" the tree to 
another version ;)

		Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help