commit - fb95e70d03a91abd90acdff115ea7aa7ce29b9a4
commit + c591440fff37d0195c98e6a7357f881ec9d5a8df
blob - 1c3d853f2b51d2bb75f62836b8dac88680acea7a
blob + 189c8b310d86959f88116a40e56c42c974aaf9b5
--- tog/tog.c
+++ tog/tog.c
break;
case 's':
s->sort_by_date = !s->sort_by_date;
- tog_free_refs();
- err = tog_load_refs(s->repo, s->sort_by_date);
+ err = got_reflist_sort(&tog_refs, s->sort_by_date ?
+ got_ref_cmp_by_commit_timestamp_descending :
+ got_ref_cmp_by_name, s->repo);
+ if (err)
+ break;
+ got_reflist_object_id_map_free(tog_refs_idmap);
+ err = got_reflist_object_id_map_create(&tog_refs_idmap,
+ &tog_refs, s->repo);
if (err)
break;
ref_view_free_refs(s);