build: remove IMHEX_COMMIT_HASH_SHORT cmake flag (#1539)

This commit is contained in:
iTrooz
2024-02-10 02:40:33 +01:00
committed by GitHub
parent a5f6756659
commit f332963c75
5 changed files with 15 additions and 33 deletions

View File

@@ -655,20 +655,16 @@ namespace hex {
}
std::string getCommitHash(bool longHash) {
if (longHash) {
#if defined GIT_COMMIT_HASH_LONG
#if defined GIT_COMMIT_HASH_LONG
if (longHash) {
return GIT_COMMIT_HASH_LONG;
#else
return "Unknown";
#endif
}
else {
#if defined GIT_COMMIT_HASH_SHORT
return GIT_COMMIT_HASH_SHORT;
#else
return "Unknown";
#endif
}
} else {
return std::string(GIT_COMMIT_HASH_LONG).substr(0, 7);
}
#else
hex::unused(longHash);
return "Unknown";
#endif
}
std::string getCommitBranch() {