I am running a ci task on my Gitlab server. One of the actions is to call an exe on the build runner machine which does some updates.
I pass through the SHA1s from $CI_COMMIT_BEFORE_SHA
and $CI_COMMIT_SHA
and the code calls:
git diff --name-only $CI_COMMIT_BEFORE_SHA $CI_COMMIT_SHA
Usually it gives me a list of file names which have changed in the commit but sometimes I get the error:
fatal: bad object abcd1234
^
|-- This is the $CI_COMMIT_SHA
The repo has just been downloaded to the build runner so it is up to date, why would the git diff return a bad object here?