Get rid of refreshing cache after "git commit"?

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:48:02

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help