Resolve "gitlab 10.8 assumes that installation is a git working copy."
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?
- 
Changelog entry added, if necessary  - 
Tests added for this feature/bug  - Conform by the code review guidelines
- 
Has been reviewed by a Backend maintainer  
 - 
 - 
Conform by the merge request performance guides  - 
Conform by the style guides  - 
If you have multiple commits, please combine them into a few logically organized commits by squashing them  - 
End-to-end tests pass ( package-and-qamanual pipeline job) 
What are the relevant issue numbers?
Closes #46600 (closed)
Edited  by Grzegorz Bizon