Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324939

Summary: PlotWalk.getTags(): sorting is not stable
Product: [Technology] JGit Reporter: Mathias Kinzler <mathias.kinzler>
Component: JGitAssignee: Matthias Sohn <matthias.sohn>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sop, stefan.lay
Version: 0.9.0   
Target Milestone: 0.9.0   
Hardware: All   
OS: All   
Whiteboard:

Description Mathias Kinzler CLA 2010-09-10 05:54:59 EDT
The underlying issue is that the PlotRefComparator does only look at the commit time. If there are symbolic references, however, the commit time will not differ. Probably the comparator must take additional information into account when the times are the same. Ideally, the sorting should also be by type (tags, heads, remote). Alternatively, the AbstractPlotReneder could re-sort the array before drawing the labels.
The symptom in the EGit UI is that if you hit refresh on the History View, sometimes the sequence of the branch and tag labels (and the HEAD label) changes. Also, tags, branches, and remote branches are wildly mixed.
Comment 1 Shawn Pearce CLA 2010-12-03 16:23:59 EST
Fixed by change Ifc3863461654df7f34fdecbd2abe1f4b5d2ffb8e

http://egit.eclipse.org/r/2032