forked from osmocom/wireshark
GitLab CI: Fix Commit Check gitrevision for multiple commits
commit^N means the Nth parent of a commit object (after a merge, for example.) It is not the same as the Nth generation ancestor (following only the first parents), which is commit~N, or alternatively commit^^^^^ (N times), or even commit^1^1^1.... (See 'man gitrevisions' for details.) When the number of commits is N, we want the Nth generation ancestor. Fixes error messages like: fatal: ambiguous argument 'HEAD^3': unknown revision or path not in the working tree.
This commit is contained in:
parent
73b94e7aef
commit
0729f96fdd
|
@ -532,7 +532,7 @@ Commit Check:
|
|||
script:
|
||||
# build-ubuntu puts us in `build`.
|
||||
- cd ..
|
||||
- bash ./tools/pre-commit "HEAD^$NUM_COMMITS"
|
||||
- bash ./tools/pre-commit "HEAD~$NUM_COMMITS"
|
||||
- tools/validate-commit.py
|
||||
|
||||
# Rely on fedora:latest and debian-stable jobs for testing a recent GCC version.
|
||||
|
|
Loading…
Reference in New Issue