Let mkversionheader.sh detect presence of git and git repos #660
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an alternative to PR #492 (which was already merged into master). Without it, GAP 4.8.3 will print incorrect versions when compiled inside a surrounding git repository. E.g. if you extract GAP in your home directory, but your homedirectory is a git repository. Or if you build GAP inside sage. Or if you build GAP using my "GAP for Mac OS X" tool chain. Etc.
This is different from PR #492 because the change there was actually slightly incorrect (as a result, GAP on the master branch is back to printing "unknown" as its version).
This PR targets stable-4.8 because I actually think it would be quite desirable to have this in 4.8.3, and it has a low-risk: the worst that can happen is that a wrong version of GAP is printed; but the point of this patch is to fix such issues in various instances. On the upside, it is used only in a very specific and isolated way, so testing it is fairly easy.