diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/configuration.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util/configuration.cpp b/src/util/configuration.cpp index 9be4e4104..ce6273a13 100644 --- a/src/util/configuration.cpp +++ b/src/util/configuration.cpp @@ -216,8 +216,13 @@ std::string Configuration::getGitId() { return ""; } + const char* branchName = getGitBranchName(); + if(*branchName == '\0') { + branchName = "-"; + } + stringstream ss; - ss << "git " << getGitBranchName() << " " << string(getGitCommit()).substr(0, 8) + ss << "git " << branchName << " " << string(getGitCommit()).substr(0, 8) << ( ::CVC4::Configuration::hasGitModifications() ? " (with modifications)" : "" ); return ss.str(); } |