Skip to content

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)

image

The error in English is: remote HEAD refers to nonexistent ref, unable to checkout.

Does this MR meet the acceptance criteria?

Conformity

Related to #292017 (closed)

Edited by Francisco Javier López

Merge request reports

Loading