diff options
author | Brad King <brad.king@kitware.com> | 2010-06-23 13:14:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-06-23 13:14:43 (GMT) |
commit | bbfe241c6a4386a39ebb93cdb70a8390eab14eef (patch) | |
tree | 054d21feea9aa984dfe692a4d562b68c091e2b8a /Source/cmProcessTools.cxx | |
parent | b1418625645ebef66e54d75004c82d88807e154f (diff) | |
download | CMake-bbfe241c6a4386a39ebb93cdb70a8390eab14eef.zip CMake-bbfe241c6a4386a39ebb93cdb70a8390eab14eef.tar.gz CMake-bbfe241c6a4386a39ebb93cdb70a8390eab14eef.tar.bz2 |
CTest: Parse empty Git commits correctly
Git's diff-tree format has no '\n'-terminated blank line at the end of
its commit message body block if there are no diff lines. Instead the
message body is terminated by '\0' and there is no diff section. Teach
CTest to parse the format in this case.
Diffstat (limited to 'Source/cmProcessTools.cxx')
-rw-r--r-- | Source/cmProcessTools.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmProcessTools.cxx b/Source/cmProcessTools.cxx index cacd766..d2f7bf3 100644 --- a/Source/cmProcessTools.cxx +++ b/Source/cmProcessTools.cxx @@ -44,7 +44,7 @@ void cmProcessTools::RunProcess(struct cmsysProcess_s* cp, //---------------------------------------------------------------------------- cmProcessTools::LineParser::LineParser(char sep, bool ignoreCR): - Separator(sep), IgnoreCR(ignoreCR), Log(0), Prefix(0) + Separator(sep), IgnoreCR(ignoreCR), Log(0), Prefix(0), LineEnd('\0') { } @@ -61,8 +61,10 @@ bool cmProcessTools::LineParser::ProcessChunk(const char* first, int length) const char* last = first + length; for(const char* c = first; c != last; ++c) { - if(*c == this->Separator) + if(*c == this->Separator || *c == '\0') { + this->LineEnd = *c; + // Log this line. if(this->Log && this->Prefix) { |