diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-17 15:34:10 +0300 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-22 13:47:30 +0300 |
commit | ff47537557f0ac1919e77c5cb21f36f2e98425de (patch) | |
tree | b7164edbbc40fcdea677c1d178c1052e7b197ef0 /src/iterator.h | |
parent | e96a97f18e8f961c434e4fa4fc2c7d950480b9e9 (diff) |
diff: check files with the same or newer timestamps
When a file on the workdir has the same or a newer timestamp than the
index, we need to perform a full check of the contents, as the update of
the file may have happened just after we wrote the index.
The iterator changes are such that we can reach inside the workdir
iterator from the diff, though it may be better to have an accessor
instead of moving these structs into the header.
Diffstat (limited to 'src/iterator.h')
-rw-r--r-- | src/iterator.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/iterator.h b/src/iterator.h index db1f325a7..57f82416a 100644 --- a/src/iterator.h +++ b/src/iterator.h @@ -11,6 +11,7 @@ #include "git2/index.h" #include "vector.h" #include "buffer.h" +#include "ignore.h" typedef struct git_iterator git_iterator; @@ -286,4 +287,11 @@ typedef enum { extern int git_iterator_advance_over_with_status( const git_index_entry **entry, git_iterator_status_t *status, git_iterator *iter); +/** + * Retrieve the index stored in the iterator. + * + * Only implemented for the workdir iterator + */ +extern int git_iterator_index(git_index **out, git_iterator *iter); + #endif |