mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-08-27 20:09:23 +00:00
Sort remote refs
This commit is contained in:
parent
6aa2958ee8
commit
df267aa4b0
|
@ -39,6 +39,11 @@ namespace GitgHistory
|
|||
return a.parsed_name.shortname.ascii_casecmp(b.parsed_name.shortname);
|
||||
}
|
||||
|
||||
private static int sort_remote_refs(Gitg.Ref a, Gitg.Ref b)
|
||||
{
|
||||
return a.parsed_name.remote_branch.ascii_casecmp(b.parsed_name.remote_branch);
|
||||
}
|
||||
|
||||
public void populate(GitgExt.NavigationTreeModel model)
|
||||
{
|
||||
var repo = application.repository;
|
||||
|
@ -163,6 +168,10 @@ namespace GitgHistory
|
|||
{
|
||||
model.begin_header(rname, null);
|
||||
|
||||
var rrefs = remotes.lookup(rname);
|
||||
|
||||
rrefs.sort((CompareFunc)sort_remote_refs);
|
||||
|
||||
foreach (var rref in remotes.lookup(rname))
|
||||
{
|
||||
var it = rref;
|
||||
|
|
Loading…
Reference in a new issue