cli: Implement hunk-based code review

Review code with an interface similar to `git add -p`.
This commit is contained in:
Alexis Sellier
2023-06-22 11:15:42 +02:00
parent 22360f8c25
commit 63ff4717dc
17 changed files with 939 additions and 49 deletions
+3 -1
View File
@@ -41,7 +41,9 @@ fn patch_commits(patch: &patch::Patch, stored: &Repository) -> anyhow::Result<Ve
let commit = stored.raw().find_commit(commit)?;
lines.push(term::Line::spaced([
term::label(term::format::secondary(term::format::oid(commit.id()))),
term::label(term::format::secondary::<String>(
term::format::oid(commit.id()).into(),
)),
term::label(term::format::default(
commit.summary().unwrap_or_default().to_owned(),
)),