forked from mirrors/jj
log: output heads in graph ordered by commit id instead of by hash
It was really annoying that the order kept changing as commits got rewritten. Also, I prefer to see the latest commits at the top (like Mercurial does it).
This commit is contained in:
parent
7572a32077
commit
1f53285f64
1 changed files with 2 additions and 1 deletions
|
@ -1036,7 +1036,8 @@ fn cmd_log(
|
|||
heads = skip_uninteresting_heads(&repo, heads);
|
||||
};
|
||||
let mut heads: Vec<_> = heads.into_iter().collect();
|
||||
heads.sort();
|
||||
heads.sort_by_key(|commit| commit.committer().timestamp.clone());
|
||||
heads.reverse();
|
||||
|
||||
let commits = topo_order_reverse(
|
||||
heads,
|
||||
|
|
Loading…
Reference in a new issue