Gitlab CI : git log limited to 10 commits
I’m trying to create release notes in a Gitlab CI job, but the git log
command seems to be limited to ten commits.
So when I push ore merge more than ten commits, I have this error : fatal: Invalid revision range
. My command is git log ${CI_COMMIT_BEFORE_SHA}..HEAD
The CI clones are not full clones by default, they are shallow clones carrying only a limited count of past revisions, for performance reasons.
Increase the count of revisions fetched by the pipeline jobs by following: Optimizing GitLab for large repositories | GitLab (variable GIT_DEPTH
, value 100
for example)
Alternatively disable the shallow clone optimization entirely in the settings by following: Pipeline settings | GitLab
1 Like