Cloudy & Associates

Skip to content

Fix bug with revision string sans git repo

Chatzikos, Marios requested to merge fix_revision into master

The previous implementation assumed a .git repository be present. This is obviously not true for release tarballs. In that case, gitversion.sh emits git's fatal warnings that a repository was not found, the revision is set to the empty string, and the smoke test crashes in version.cpp.

Add a test in gitversion.sh to gracefully handle check for a git repository being present, and modify version.cpp to handle empty revision strings.

Reported-by: Peter van Hoof

Merge request reports