summaryrefslogtreecommitdiff
path: root/tag.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-03-14 23:47:06 -0400
committerJunio C Hamano <gitster@pobox.com>2014-03-17 15:03:32 -0700
commit7839632167bc6ceef20f28bd046f7001493b070f (patch)
treea61644530405b976da4af5eed725a9d9930788ea /tag.c
parent0179c945fce361c56b465e8a3f0fdf0962a816a1 (diff)
downloadgit-7839632167bc6ceef20f28bd046f7001493b070f.tar.gz
shallow: verify shallow file after taking lockjk/shallow-update-fix
Before writing the shallow file, we stat() the existing file to make sure it has not been updated since our operation began. However, we do not do so under a lock, so there is a possible race: 1. Process A takes the lock. 2. Process B calls check_shallow_file_for_update and finds no update. 3. Process A commits the lockfile. 4. Process B takes the lock, then overwrite's process A's changes. We can fix this by doing our check while we hold the lock. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tag.c')
0 files changed, 0 insertions, 0 deletions