From: Junio C Hamano Date: Thu, 8 Mar 2018 20:36:30 +0000 (-0800) Subject: Merge branch 'bp/untracked-cache-noflush' X-Git-Tag: v2.17.0-rc0~21 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/cdda65acae0b05a197c9f6684d517a5c4325c08f Merge branch 'bp/untracked-cache-noflush' 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 --- cdda65acae0b05a197c9f6684d517a5c4325c08f 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"