summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2015-03-08 10:12:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-03-12 20:45:17 (GMT)
commited4efab1b17e883b761b4482c40c04a4529be8f9 (patch)
treeb5f43046f55053b9d8e4396e0d88b60395f9b244 /cache.h
parent2bb4cda1987afe6911a1c193283213babda328d2 (diff)
downloadgit-ed4efab1b17e883b761b4482c40c04a4529be8f9.zip
git-ed4efab1b17e883b761b4482c40c04a4529be8f9.tar.gz
git-ed4efab1b17e883b761b4482c40c04a4529be8f9.tar.bz2
untracked cache: avoid racy timestamps
When a directory is updated within the same second that its timestamp is last saved, we cannot realize the directory has been updated by checking timestamps. Assume the worst (something is update). See 29e4d36 (Racy GIT - 2005-12-20) for more information. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 811cc36..120d337 100644
--- a/cache.h
+++ b/cache.h
@@ -555,6 +555,8 @@ extern void fill_stat_data(struct stat_data *sd, struct stat *st);
* INODE_CHANGED, and DATA_CHANGED.
*/
extern int match_stat_data(const struct stat_data *sd, struct stat *st);
+extern int match_stat_data_racy(const struct index_state *istate,
+ const struct stat_data *sd, struct stat *st);
extern void fill_stat_cache_info(struct cache_entry *ce, struct stat *st);