Skip to content

Resolve "API v4 allows setting a branch that doesn't exist as the default one"

What does this MR do?

This MR adds checks for branch existence before setting it as the default branch.

Why was this MR needed?

Current behavior allows to set a branch as the default branch even if this branch does not exist.
After that git checkout is broken because of unexisted ref.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #36010 (closed)

Edited by username-removed-86853

Merge request reports