Thread (9 messages) flat view 9 messages, 2 authors, 2016-06-15

Re: [PATCH 9/9] Build in checkout

From: Daniel Barkalow <hidden>
Date: 2016-06-15 22:44:10

On Tue, 5 Feb 2008, Johannes Schindelin wrote:
Hi,

On Tue, 5 Feb 2008, Daniel Barkalow wrote:
quoted
On Tue, 5 Feb 2008, Johannes Schindelin wrote:
quoted
I suggested that: to prevent the index from needing an update.

This is quite important if you have a large working tree, and switch 
branches from A to B.  For example, "make" will punish you where it 
hurts.
This isn't used for switching branches; this is used for checking out 
paths. If you do "git checkout <not-head> -- <every single path>", make 
will punish you, but why would you do that? I'd guess that people are 
unlikely to have a significant number of non-changes in this piece of 
code, just because they wouldn't list things that they didn't think had 
changes.
For convenience, you can also say

	$ git checkout -- <path>

and expect checkout to not really touch the unchanged files.
That also doesn't use this function, which is only for reading the tree 
into the index if a tree is given. On the other hand:

$ git checkout HEAD -- .

With either git-checkout.sh or my code, touches all of your files.

	-Daniel
*This .sig left intentionally blank*
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help