Skip to content

[EE] Replace Gitlab::REVISION with Gitlab.revision and handle installations…

EE MR for https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19125.

What does this MR do?

This replaces Gitlab::REVISION with a Gitlab.revision which handles installation that don't have a .git directory. In that case, Gitlab.revision will return Unknown.

Are there points in the code the reviewer needs to double check?

This is a quick fix to resolve the %10.8 regression, but I've suggested a more long-term improvement in https://gitlab.com/gitlab-org/gitlab-ce/issues/46600#note_74743108 where we'd use a new REVISION file and update it at release time.

omnibus-gitlab!2540 (merged) needs to be released in the same release as this fix.

Why was this MR needed?

Because otherwise the revision would be set to fatal: Not a git repository, which isn't very helpful.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Fixes gitlab-org/gitlab-ce#46600.

Edited by Rémy Coutable

Merge request reports