forked from mirrors/jj
evolog: use predecessor_ids() where commit object isn't needed
This commit is contained in:
parent
25819dd1c9
commit
c3ed3e3781
1 changed files with 5 additions and 4 deletions
|
@ -142,10 +142,11 @@ pub(crate) fn cmd_evolog(
|
||||||
if !args.no_graph {
|
if !args.no_graph {
|
||||||
let mut graph = get_graphlog(graph_style, formatter.raw());
|
let mut graph = get_graphlog(graph_style, formatter.raw());
|
||||||
for commit in commits {
|
for commit in commits {
|
||||||
let mut edges = vec![];
|
let edges = commit
|
||||||
for predecessor in commit.predecessors() {
|
.predecessor_ids()
|
||||||
edges.push(Edge::Direct(predecessor?.id().clone()));
|
.iter()
|
||||||
}
|
.map(|id| Edge::Direct(id.clone()))
|
||||||
|
.collect_vec();
|
||||||
let graph_width = || graph.width(commit.id(), &edges);
|
let graph_width = || graph.width(commit.id(), &edges);
|
||||||
let mut buffer = vec![];
|
let mut buffer = vec![];
|
||||||
with_content_format.write_graph_text(
|
with_content_format.write_graph_text(
|
||||||
|
|
Loading…
Reference in a new issue