Re: speed of git reset -- file

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

 



On Tue, May 31, 2011 at 04:39:25PM -0700, Junio C Hamano wrote:

> "git reset" has always refreshed the index. If somebody _really_ wants to
> introduce a slight inconsistency to "git reset" so that only in "per-path"
> mode it doesn't refresh, the call to refresh_index() can easily be removed
> from update_index_refresh(). There is no "we end up having to".
> 
> IOW, we refresh by choice, design and inertia ;-).

Ah, yeah, I really wasn't thinking of the fact that refreshing is a
user-facing operation. These days most of the porcelain commands will do
it for you automatically, so it's easy to forget.

So implementing the "optimization" to drop the refresh here doesn't seem
worth it. It inroduces an awful inconsistency, and it probably isn't
saving much in practice. Lots of other commands will end up stat'ing
everything, anyway. Users with giant repos or slow stat calls are
probably better off using assume-unchanged, which would help this and
many other situations.

-Peff
--
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]