fn(commits$0, index$1, branches$2) =>
match @core.list-get(list: $0, index: $1) {
#none(_) =>
$2,
#some(item$1008) =>
let commit$3 = $1008;
let project_name$4 = $3.project_name;
let branch$5 = $3.branch;
@core.project-branches-from(
commits: $0,
index: @core.plus(left: $1, right: 1),
branches: match @core.branch-summaries-have(branches: $2, project_name: $4, branch: $5, index: 0) {
true =>
$2,
false =>
match @core.branch-first-snapshot(commits: $0, project_name: $4, branch: $5, index: $1, found: #none) {
#none(_) =>
$2,
#some(first$6) =>
match @core.branch-latest-snapshot(commits: $0, project_name: $4, branch: $5, index: $1, found: #none) {
#none(_) =>
$2,
#some(latest$7) =>
@core.list-append(
list: $2,
item: {
project_name: $4,
name: $5,
creator_account_id: $6.account_id,
latest_event_hash: $7.event_hash,
latest_time: $7.time,
commit_count: @core.branch-snapshot-count(commits: $0, project_name: $4, branch: $5, index: $1, count: 0)
}
)
}
}
}
)
}