]> git.proxmox.com Git - libgit2.git/commit - src/libgit2/attrcache.h
attrcache: don't re-read attrs during checkout
authorEdward Thomson <ethomson@microsoft.com>
Thu, 29 Jan 2015 20:40:55 +0000 (14:40 -0600)
committerEdward Thomson <ethomson@microsoft.com>
Tue, 3 Feb 2015 05:31:08 +0000 (00:31 -0500)
commit9f779aacdd950fd53a407da615ca60d628e31d35
tree55819aa11a18e2d272d75118239d23243b49357a
parent60561d54468d7097e04466fd8125be5231cea637
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.
src/attr.c
src/attr_file.c
src/attr_file.h
src/attrcache.c
src/attrcache.h
src/checkout.c
src/filter.c
src/filter.h
src/ignore.c
src/repository.h