git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Get rid of refreshing cache after "git commit"?
@ 2010-01-17  8:16 Nguyen Thai Ngoc Duy
  2010-01-17  8:27 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Nguyen Thai Ngoc Duy @ 2010-01-17  8:16 UTC (permalink / raw)
  To: Git Mailing List

Hi,

The current "git commit" refreshes cache and writes out after a
commit. I dug back in history to see how it was introduced. It looks
like from the very first days of "git commit", which was
git-commit-script at that time, git-update-cache was called on
specified paths, until commit 22cff6a (git-commit: pass explicit path
to git-diff-files. - 2005-08-16) started to do "git-update-cache -q
--refresh" without paths and the tradition keeps going until today.

Nowadays almost (all?) porcelain commands silently refresh index
before doing anything relating to worktree, I wonder if this tradition
is still necessary. On (again) gentoo-x86 repository, taking out the
refresh part could cut down about 1 sec on total 3 secs from "git
commit -m foo".
-- 
Duy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-17  8:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-17  8:16 Get rid of refreshing cache after "git commit"? Nguyen Thai Ngoc Duy
2010-01-17  8:27 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).