Remove '.git/hooks/post-checkout' hooks when using fetch strategy
This is a general Merge Request template. Consider to choose a template from the list above if it will match your case more.
What does this MR do?
Removes .git/hooks/post-checkout
hook which could be create on previous job. Usable when using fetch
strategy.
Why was this MR needed?
Please read #2245 (closed) (especially https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/2245#note_30792147) for a reference
Are there points in the code the reviewer needs to double check?
Does this MR meet the acceptance criteria?
-
Documentation created/updated - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Branch has no merge conflicts with master
(if you do - rebase it please)
What are the relevant issue numbers?
Closes #2245 (closed)
Merge request reports
Activity
@tmaczukin Should we document that behaviour of clone? Can someone be surprised by it?
Hmmm, yeah, it make sense. But where should we document it? In Runner's documentation (if yes, then in which section)? Or in GitLab's documentation? We don't have any documentation describing how job uses Git, only few places where we describe configuration options. Maybe it should be created and added as a new entry to https://docs.gitlab.com/ce/ci/#advanced-use? There we could describe that when using
fetch
strategy we're deleting thepost-checkout
hook. Or should we just add this to the description ofGIT_STRATEGY
?I wonder if the better way would not be to specify: core.hooksPath to path outside of repository?