Hide commit signature information when fetching commit hash

If someone configures git to always show a commit’s signing information,
this breaks the definition of GitVersion in revision.h:

```
#ifndef ASSIMP_REVISION_H_INC
#define ASSIMP_REVISION_H_INC

#define GitVersion 0xgpg: Signature faite le Fri 15 Jun 2018 20:39:53 CEST
gpg:                avec la clef RSA 4AEE18F83AFDEB23
gpg: Impossible de vérifier la signature : Pas de clef publique
878b4b2c
#define GitBranch "master"

#endif // ASSIMP_REVISION_H_INC
```

This can be avoided by passing the `--no-show-signature` to the `git
log` command for retrieving the hash.
pull/2020/head
Pierre Moreau 2018-06-16 09:29:18 +02:00
parent e3bfd08445
commit 8334bb579c
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ EXECUTE_PROCESS(
# Get the latest abbreviated commit hash of the working branch
EXECUTE_PROCESS(
COMMAND git log -1 --format=%h
COMMAND git log -1 --format=%h --no-show-signature
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE