Natural (semantic) sort branches?
Description
I inquired about this already here (talked specifically with @rspeicher on it), but it seems that it was kept as is. Right now tags are semantic sorted so that version numbers are sorted numerically, but branches are still done by a basic alphabetical search.
Proposal
Switch to semantic ordering for branches. The version sorter gem will still do fine with alphabetical names.
I suggest this because:
- it keeps sorting consistent with branches, so branches that feed into tags (e.g., branches for work on version numbers until release) are sorted the same way
- there are other requests for numeric sorting for other aspects that someone else and I have requested (gitlab-ce#20378 and gitlab-ce#26446), so this would keep it consistent with that
- not all repositories have a sane branching structure. Where I work, there are hundreds of branches (not tags) that have a X.X.X.X numbering scheme and sorting alphabetically makes it difficult to find these branches. Even it Gitlab's project there are branches of the X-Y-stable form that this would benefit.
If there is something I'm unaware of that influences whether this is done (esp. with older comments on it), I understand, but otherwise, I'm willing to file an MR to change it.
Thanks :)
Links / references
- Original inquiry
- gitlab-ce#20378
- gitlab-ce#26466