Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer correct local and remote branches sort to tags #8622

Merged
merged 1 commit into from Nov 28, 2020

Conversation

RussKie
Copy link
Member

@RussKie RussKie commented Nov 20, 2020

Relates to #8621

Proposed changes

Git tags may be concrete refs and ephemeral (i.e. dereferences), which
adds a layer of complexity to sorting refs.

The original sort mechanism ordered by refs first, followed by derefs.
However it caused local and remote branches to be sorted incorrectly.

Invert the sort order to ensure branches are sorted correctly at the expense
of correct tags order.


✒️ I contribute this code under The Developer Certificate of Origin.

Git tags may be concrete refs and ephemeral (i.e. dereferences), which
adds a layer of complexity to sorting refs.

The original sort mechanism ordered by refs first, followed by derefs.
However it caused local and remote branches to be sorted incorrectly.

Invert the sort order to ensure branches are sorted correctly at the expense
of correct tags order.

Relates to gitextensions#8621
@RussKie RussKie requested review from gerhardol, mstv and a team November 20, 2020 11:59
@ghost ghost assigned RussKie Nov 20, 2020
@codecov
Copy link

codecov bot commented Nov 20, 2020

Codecov Report

Merging #8622 (cd49201) into master (8f45587) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #8622      +/-   ##
==========================================
+ Coverage   55.12%   55.14%   +0.01%     
==========================================
  Files         906      906              
  Lines       65546    65546              
  Branches    11871    11871              
==========================================
+ Hits        36135    36148      +13     
+ Misses      26585    26573      -12     
+ Partials     2826     2825       -1     
Flag Coverage Δ
production 42.16% <100.00%> (+0.02%) ⬆️
tests 94.90% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sorting A-Z seems to be OK for the GE repo. It is identical as with my older own build.
Though I do not get the issue regarding tags.

@RussKie RussKie merged commit e0d47d8 into gitextensions:master Nov 28, 2020
@RussKie RussKie deleted the fix_refs_sort branch November 28, 2020 01:03
@ghost ghost added this to the 4.0 milestone Nov 28, 2020
@RussKie RussKie linked an issue Dec 10, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect refs sorting
3 participants