diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-10-29 21:12:37 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-10-30 19:49:35 +0100 |
commit | eb5977991a75f8d1630348a529805ba40765a616 (patch) | |
tree | bcfe5564a27a4c10a065de0afe7dac761d0d68c4 /src/fileops.h | |
parent | a2f96479abfe17357f666a80d9d0163dd8014fa1 (diff) | |
download | libgit2-eb5977991a75f8d1630348a529805ba40765a616.tar.gz |
filebuf: use a checksum to detect file changes
Instead of relying on the size and timestamp, which can hide changes
performed in the same second, hash the file content's when we care about
detecting changes.
Diffstat (limited to 'src/fileops.h')
-rw-r--r-- | src/fileops.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fileops.h b/src/fileops.h index 572ff01a5..c6db1953e 100644 --- a/src/fileops.h +++ b/src/fileops.h @@ -13,6 +13,7 @@ #include "path.h" #include "pool.h" #include "strmap.h" +#include "oid.h" /** * Filebuffer methods @@ -21,7 +22,7 @@ */ extern int git_futils_readbuffer(git_buf *obj, const char *path); extern int git_futils_readbuffer_updated( - git_buf *obj, const char *path, time_t *mtime, size_t *size, int *updated); + git_buf *obj, const char *path, git_oid *checksum, int *updated); extern int git_futils_readbuffer_fd(git_buf *obj, git_file fd, size_t len); extern int git_futils_writebuffer( |