(&self, max_count: usize)
| 529 | } |
| 530 | |
| 531 | async fn log(&self, max_count: usize) -> Result<Vec<WorkspaceGitCommit>> { |
| 532 | let capped = max_count.min(self.max_log_entries); |
| 533 | let resp: LogResp = self.post_json("log", &LogReq { max_count: capped }).await?; |
| 534 | Ok(resp |
| 535 | .commits |
| 536 | .into_iter() |
| 537 | .map(|c| WorkspaceGitCommit { |
| 538 | id: c.id, |
| 539 | message: c.message, |
| 540 | author: c.author, |
| 541 | date: c.date, |
| 542 | }) |
| 543 | .collect()) |
| 544 | } |
| 545 | |
| 546 | async fn list_branches(&self) -> Result<Vec<WorkspaceGitBranch>> { |
| 547 | let resp: BranchesResp = self.post_json("branches", &EmptyReq).await?; |
no test coverage detected