Skip to content

Fix bug setting hook env with personal snippets

Francisco Javier López requested to merge fj-fix-bug-hook-env into master

What does this MR do?

Implementing checks inside GitAccessSnippet, we detected that some repository operations like ls_files weren't returning the right result and some Gitaly errors were raised. We narrow the scope to only personal snippets. But why that kind and not project snippet?

The problem was here. The guard clause if project prevented to set the HookEnv and, therefore, not setting the env var GIT_OBJECT_DIRECTORY properly.

Instead, we should check if container because personal snippets might not have a project attached.

Does this MR meet the acceptance criteria?

Conformity

Edited by Francisco Javier López

Merge request reports

Loading