diff options
author | Evan Martin <martine@danga.com> | 2012-06-19 17:31:14 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-06-19 17:31:14 (GMT) |
commit | b3d63db1facc7ee9d14e211cc738f34b702de833 (patch) | |
tree | 1f5201433c02a407823722b80161ae1a131a44dd /src/build_log.cc | |
parent | 350f0fc34d222ba6a45dbbf1e858a51924bf1967 (diff) | |
download | Ninja-b3d63db1facc7ee9d14e211cc738f34b702de833.zip Ninja-b3d63db1facc7ee9d14e211cc738f34b702de833.tar.gz Ninja-b3d63db1facc7ee9d14e211cc738f34b702de833.tar.bz2 |
switch build log to print hashes as hex
Nico convinced me that it's safe to do this without revving the build
log format: the old decimal values will still parse as hex (just as
different numbers) and cause a superfluous rebuild.
Diffstat (limited to 'src/build_log.cc')
-rw-r--r-- | src/build_log.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/build_log.cc b/src/build_log.cc index 86b660f..02a9fb5 100644 --- a/src/build_log.cc +++ b/src/build_log.cc @@ -296,7 +296,7 @@ bool BuildLog::Load(const string& path, string* err) { entry->restat_mtime = restat_mtime; if (log_version >= 5) { char c = *end; *end = '\0'; - entry->command_hash = (uint64_t)strtoull(start, NULL, 10); + entry->command_hash = (uint64_t)strtoull(start, NULL, 16); *end = c; } else { entry->command_hash = LogEntry::HashCommand(StringPiece(start, @@ -332,7 +332,7 @@ BuildLog::LogEntry* BuildLog::LookupByOutput(const string& path) { } void BuildLog::WriteEntry(FILE* f, const LogEntry& entry) { - fprintf(f, "%d\t%d\t%d\t%s\t%" PRIu64 "\n", + fprintf(f, "%d\t%d\t%d\t%s\t%" PRIx64 "\n", entry.start_time, entry.end_time, entry.restat_mtime, entry.output.c_str(), entry.command_hash); } |