Skip to content

Allow branchnames to be named the same as the commit it points to

In the case where the branch name is a valid commit ID too, git will display a warning message like:

warning: refname '6733c897c319018fd0753caf8d4f8eb1fa35d75e' is ambiguous. Git normally never creates a ref that ends with 40 hex characters because it will be ignored when you just specify 40-hex. These refs may be created by mistake. For example,

git checkout -b $br $(git rev-parse ...)

where "$br" is somehow empty and a 40-hex ref is created. Please examine these refs and maybe delete them. Turn this message off by running "git config advice.objectNameWarning false"

This is hard to parse for GitLab and can result in webpages returning status code 500 in the %10.5 release candidates.

Does this MR meet the acceptance criteria?

  • Changelog entry added, if necessary
  • Tests added for this feature/bug
  • Review
    • Has been reviewed by Backend
Edited by Zeger-Jan van de Weg

Merge request reports