| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include <sstream> | ||
| 4 | |||
| 5 | #include "git.hpp" | ||
| 6 | |||
| 7 | 1 | inline std::string programInfo() { | |
| 8 | 1 | std::stringstream result; | |
| 9 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | result << "This is MBD"; |
| 10 | #ifdef GIT_RETRIEVED_STATE | ||
| 11 | 1 | if (GIT_RETRIEVED_STATE) { | |
| 12 |
5/10✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
|
1 | result << "\nCommit: " << GIT_HEAD_SHA1 << " (" << GIT_COMMIT_DATE_ISO8601 << ")"; |
| 13 | 1 | if (GIT_IS_DIRTY) { | |
| 14 | result << "\nWARNING: There were uncommitted changes at time of build."; | ||
| 15 | } | ||
| 16 | } else { | ||
| 17 | result << "\nNo version info available (could not retrieve git state at build time)."; | ||
| 18 | } | ||
| 19 | #else | ||
| 20 | result << "\nNo version info available (could not construct git version header at build time)."; | ||
| 21 | #endif | ||
| 22 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | return result.str(); |
| 23 | 1 | } | |
| 24 |