diff options
author | Edward Thomson <ethomson@microsoft.com> | 2015-01-29 14:40:55 -0600 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2015-02-03 00:31:08 -0500 |
commit | 9f779aacdd950fd53a407da615ca60d628e31d35 (patch) | |
tree | 55819aa11a18e2d272d75118239d23243b49357a /src/repository.h | |
parent | 60561d54468d7097e04466fd8125be5231cea637 (diff) | |
download | libgit2-9f779aacdd950fd53a407da615ca60d628e31d35.tar.gz |
attrcache: don't re-read attrs during checkout
During checkout, assume that the .gitattributes files aren't
modified during the checkout. Instead, create an "attribute session"
during checkout. Assume that attribute data read in the same
checkout "session" hasn't been modified since the checkout started.
(But allow subsequent checkouts to invalidate the cache.)
Further, cache nonexistent git_attr_file data even when .gitattributes
files are not found to prevent re-scanning for nonexistent files.
Diffstat (limited to 'src/repository.h')
-rw-r--r-- | src/repository.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/repository.h b/src/repository.h index 6da8c289b..dffa9a8ae 100644 --- a/src/repository.h +++ b/src/repository.h @@ -133,6 +133,8 @@ struct git_repository { has_8dot3_default:1; unsigned int lru_counter; + git_atomic attr_session_key; + git_cvar_value cvar_cache[GIT_CVAR_CACHE_MAX]; }; |