summaryrefslogtreecommitdiff
path: root/src/attrcache.c
Commit message (Collapse)AuthorAgeFilesLines
* pool: Simplify implementationVicent Marti2015-10-281-2/+3
|
* config: borrow refcounted referencescmn/config-borrow-entryCarlos Martín Nieto2015-03-031-1/+2
| | | | | | | | | | | | | | | This changes the get_entry() method to return a refcounted version of the config entry, which you have to free when you're done. This allows us to avoid freeing the memory in which the entry is stored on a refresh, which may happen at any time for a live config. For this reason, get_string() has been forbidden on live configs and a new function get_string_buf() has been added, which stores the string in a git_buf which the user then owns. The functions which parse the string value takea advantage of the borrowing to parse safely and then release the entry.
* Remove extra semicolon outside of a functionStefan Widgren2015-02-151-1/+1
| | | | | Without this change, compiling with gcc and pedantic generates warning: ISO C does not allow extra ‘;’ outside of a function.
* attr_session: keep a temp bufferEdward Thomson2015-02-041-3/+7
|
* attrcache: don't re-read attrs during checkoutEdward Thomson2015-02-031-2/+3
| | | | | | | | | | | 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.
* Merge pull request #2303 from jacquesg/mingw-lseekVicent Marti2014-05-191-1/+1
|\ | | | | WIP: Windows fixes
| * git_pool_mallocsz takes an unsigned longJacques Germishuys2014-05-011-1/+1
| |
* | Increase use of config snapshotsrb/coverity-fixesRussell Belfer2014-05-131-4/+7
|/ | | | And decrease extra reload checks of config data.
* Fix some coverity-found issuesRussell Belfer2014-04-211-6/+4
|
* attrcache: fix use-after-freeCarlos Martín Nieto2014-04-211-1/+1
| | | | Reported by coverity.
* Some memory leak fixesRussell Belfer2014-04-171-26/+28
|
* Fix broken logic for attr cache invalidationRussell Belfer2014-04-171-61/+61
| | | | | | | The checks to see if files were out of date in the attibute cache was wrong because the cache-breaker data wasn't getting stored correctly. Additionally, when the cache-breaker triggered, the old file data was being leaked.
* Fix tests with new attr cache codeRussell Belfer2014-04-171-33/+82
|
* Attribute file cache refactorRussell Belfer2014-04-171-0/+397
This is a big refactoring of the attribute file cache to be a bit simpler which in turn makes it easier to enforce a lock around any updates to the cache so that it can be used in a threaded env. Tons of changes to the attributes and ignores code.