deps log: recover on truncated entry
authorEvan Martin <martine@danga.com>
Sat, 27 Apr 2013 20:39:04 +0000 (13:39 -0700)
committerEvan Martin <martine@danga.com>
Sat, 27 Apr 2013 20:39:04 +0000 (13:39 -0700)
commitb549d18748a82d2a0e0efccb5ac6d9e3714f5234
tree6c4837a75a2bef428c8656cc7b425cc712907b9e
parent896b81c1fe50b11012a34365a11b8fcaba33350f
deps log: recover on truncated entry

If a read fails while reading an entry, truncate the log to the last
successfully read entry.  This prevents corruption when a subsequent
run appends another entry.
src/deps_log.cc
src/deps_log_test.cc