![]() |
Chaste Commit::29c3c4ab2bee00ddd311a035a1e522c03cbe928a
|
#include <SourceRevision.hpp>
Collaboration diagram for SourceRevision:Public Member Functions | |
| SourceRevision (const std::string &rCommit="unknown", bool isModified=false) | |
| const std::string & | rGetCommit () const |
| std::string | GetShortCommit () const |
| bool | IsKnown () const |
| bool | IsModified () const |
Static Public Attributes | |
| static constexpr std::size_t | SHORT_COMMIT_LENGTH = 12u |
Private Attributes | |
| std::string | mCommit |
| bool | mIsModified |
The commit a source tree (Chaste itself, or a checked out project) was built from, and whether it had uncommitted changes at the time. See ChasteBuildInfo::GetChasteRevision() and ChasteBuildInfo::GetProjectRevisions().
Definition at line 47 of file SourceRevision.hpp.
| SourceRevision::SourceRevision | ( | const std::string & | rCommit = "unknown", |
| bool | isModified = false |
||
| ) |
Constructor.
| rCommit | the full commit hash, or "unknown" |
| isModified | whether the source tree had uncommitted changes |
Definition at line 38 of file SourceRevision.cpp.
| std::string SourceRevision::GetShortCommit | ( | ) | const |
Definition at line 49 of file SourceRevision.cpp.
References IsKnown(), mCommit, and SHORT_COMMIT_LENGTH.
Referenced by ExecutableSupport::ShowCopyright(), and ExecutableSupport::WriteProvenanceInfoFile().
| bool SourceRevision::IsKnown | ( | ) | const |
Definition at line 54 of file SourceRevision.cpp.
References mCommit.
Referenced by GetShortCommit().
| bool SourceRevision::IsModified | ( | ) | const |
Definition at line 59 of file SourceRevision.cpp.
References mIsModified.
Referenced by ExecutableSupport::GetBuildInfo().
| const std::string & SourceRevision::rGetCommit | ( | ) | const |
Definition at line 44 of file SourceRevision.cpp.
References mCommit.
Referenced by ExecutableSupport::GetBuildInfo().
|
private |
The full commit hash, or "unknown".
Definition at line 51 of file SourceRevision.hpp.
Referenced by GetShortCommit(), IsKnown(), and rGetCommit().
|
private |
Whether the source tree had uncommitted changes to tracked files.
Definition at line 54 of file SourceRevision.hpp.
Referenced by IsModified().
|
staticconstexpr |
The number of characters GetShortCommit() keeps: unambiguous within Chaste's history.
Definition at line 58 of file SourceRevision.hpp.
Referenced by GetShortCommit().