Fix bug when creating snippet and default branch not master
What does this MR do?
When a new snippet repository is created, the ref inside HEAD is master
even when the instance default branch is different.
This also happens with projects. This resource fixes this by explicitly rewriting the HEAD reference and we're applying the same behavior to snippets.
When the snippet repository is pushed or pulled we update the reference inside the HEAD file. This process will be done once, repeated push/pull actions won't trigger the rewrite.
Screenshots (strongly suggested)
The error in English is: remote HEAD refers to nonexistent ref, unable to checkout.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Separation of EE specific content
Related to #292017 (closed)
Edited by Francisco Javier López