From: Junio C Hamano Date: Fri, 2 Mar 2018 20:18:31 +0000 (-0800) Subject: Merge branch 'bp/untracked-cache-noflush' into next X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/709887971b4b4fa6e821a78a59c93a3d58584882?hp=--cc Merge branch 'bp/untracked-cache-noflush' into next Writing out the index file when the only thing that changed in it is the untracked cache information is often wasteful, and this has been optimized out. * bp/untracked-cache-noflush: untracked cache: use git_env_bool() not getenv() for customization dir.c: don't flag the index as dirty for changes to the untracked cache --- 709887971b4b4fa6e821a78a59c93a3d58584882 diff --cc dir.c index 6dd91be818,d445d77e62..dedbf5d476 --- a/dir.c +++ b/dir.c @@@ -2295,9 -2291,13 +2300,14 @@@ int read_directory(struct dir_struct *d dir->nr = i; } + trace_performance_since(start, "read directory %.*s", len, path); if (dir->untracked) { + static int force_untracked_cache = -1; static struct trace_key trace_untracked_stats = TRACE_KEY_INIT(UNTRACKED_STATS); + + if (force_untracked_cache < 0) + force_untracked_cache = + git_env_bool("GIT_FORCE_UNTRACKED_CACHE", 0); trace_printf_key(&trace_untracked_stats, "node creation: %u\n" "gitignore invalidation: %u\n"