Skip to content

Remove support for absolute dirs from Git::Env

Jacob Vosmaer requested to merge git-env-repo into master

What does this MR do?

  • Remove support for absolute paths passed from Git hooks to GitLab API requests. We only supported this for backwards compatibility while switching to relative paths, and that switch happened in October 2017.
  • Rename Gitlab::Git::Env to Gitlab::Git::HookEnv because that makes it clearer what the class is for
  • Key data stored in Gitlab::Git::HookEnv by 'gl_repository', because the data is specific to a repository, not global.

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

If we do things wrong in this MR both SSH and HTTP Git push will break, depending on what push related features are enabled.

Why was this MR needed?

To reduce the number of places where we directly access repository paths, and to clean up some backwards compatibility code that is no longer needed.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Edited by Jacob Vosmaer

Merge request reports