Thread (3 messages) 3 messages, 3 authors, 2017-02-02

Re: git commit results in many lstat()s

From: Junio C Hamano <hidden>
Date: 2017-02-01 23:50:58

"Gumbel, Matthew K" [off-list ref] writes:
"Junio C Hamano" [off-list ref] writes:
quoted
There probably are other things that can be optimized.
Yes, I think that when the user passes --only flag to git-commit, then git does not
need to call refresh_cache() in prepare_index() in builtin/commit.c.

I may experiment with that. Do you see any downside or negative side-effects?
There may be other fallouts, but one that immediately comes to mind
is that it may break pre-commit hook.

When we get "--only", we prepare an temporary index to create the
commit out of, and give it to the pre-commit hook.  The hook expects
that the cached stat information is up-to-date, iow, it does not
have to do 'update-index --refresh' before using plumbing commands
like "diff-index" to do its own inspection of the working tree.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help