Re: naive question
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Apr 19, 2005, 17:41 UTC
- Message-ID
- <Pine.LNX.4.58.0504191036560.19286@ppc970.osdl.org>
- In-Reply-To
- <20050419171534.GH12757@pasky.ji.cz>
On Tue, 19 Apr 2005, Petr Baudis wrote:
Show 6 quoted lines
> > I'd actually prefer, if: > > (i) checkout-cache simply wouldn't touch files whose stat matches with > what is in the cache; it updates the cache with the stat informations > of touched files
Run "update-cache --refresh" _before_ doing the "checkout-cache", and that is exactly what will happen.
But yes, if you want to make checkout-cache update the stat info (Ingo wanted to do that too), it should be possible. The end result is a combination of "update-cache" and "checkout-cache", though: you'll effectively need to both (just in one pass).
With the current setup, you have to do
update-cache --refresh checkout-cache -f -a update-cache --refresh
which is admittedly fairly inefficient.
The real expense right now of a merge is that we always forget all the stat information when we do a merge (since it does a read-tree). I have a cunning way to fix that, though, which is to make "read-tree -m" read in the old index state like it used to, and then at the end just throw it away except for the stat information.
Linus