diff options
| author | Russell Belfer <rb@github.com> | 2012-05-10 11:08:59 -0700 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2012-05-10 11:12:43 -0700 |
| commit | dc13f1f7d71a22d6618c9a5db18335c005da9795 (patch) | |
| tree | 83e03271144ce6779644f51021c6b5a7853798a0 /src/attr_file.h | |
| parent | fb49bdf9c7837892154bf7efdb3db6c3ec63e396 (diff) | |
| download | libgit2-dc13f1f7d71a22d6618c9a5db18335c005da9795.tar.gz | |
Add cache busting to attribute cache
This makes the git attributes and git ignores cache check
stat information before using the file contents from the
cache. For cached files from the index, it checks the SHA
of the file instead. This should reduce the need to ever
call `git_attr_cache_flush()` in most situations.
This commit also fixes the `git_status_should_ignore` API
to use the libgit2 standard parameter ordering.
Diffstat (limited to 'src/attr_file.h')
| -rw-r--r-- | src/attr_file.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/attr_file.h b/src/attr_file.h index ec488c4dc..3718f4bda 100644 --- a/src/attr_file.h +++ b/src/attr_file.h @@ -48,10 +48,20 @@ typedef struct { } git_attr_assignment; typedef struct { + git_time_t seconds; + git_off_t size; + unsigned int ino; +} git_attr_file_stat_sig; + +typedef struct { char *key; /* cache "source#path" this was loaded from */ git_vector rules; /* vector of <rule*> or <fnmatch*> */ git_pool *pool; bool pool_is_allocated; + union { + git_oid oid; + git_attr_file_stat_sig st; + } cache_data; } git_attr_file; typedef struct { |
