Merge branch 'ym/fix-opportunistic-index-update-race' into maint
"git status", even though it is a read-only operation, tries to update the index with refreshed lstat(2) info to optimize future accesses to the working tree opportunistically, but this could race with a "read-write" operation that modify the index while it is running. Detect such a race and avoid overwriting the index. * ym/fix-opportunistic-index-update-race: read-cache.c: verify index file before we opportunistically update it wrapper.c: add xpread() similar to xread()
This commit is contained in:
@ -531,6 +531,7 @@ extern void *xcalloc(size_t nmemb, size_t size);
|
||||
extern void *xmmap(void *start, size_t length, int prot, int flags, int fd, off_t offset);
|
||||
extern ssize_t xread(int fd, void *buf, size_t len);
|
||||
extern ssize_t xwrite(int fd, const void *buf, size_t len);
|
||||
extern ssize_t xpread(int fd, void *buf, size_t len, off_t offset);
|
||||
extern int xdup(int fd);
|
||||
extern FILE *xfdopen(int fd, const char *mode);
|
||||
extern int xmkstemp(char *template);
|
||||
|
Reference in New Issue
Block a user