Skip to content

Commit 1c2504c

Browse files
committed
feat(submit): print submit status for each commit individually
1 parent 70b9a36 commit 1c2504c

File tree

7 files changed

+317
-315
lines changed

7 files changed

+317
-315
lines changed

git-branchless-submit/src/branch_forge.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,14 @@ These remotes are available: {}",
325325
progress.notify_progress_inc(branch_names.len());
326326

327327
// FIXME: report push errors
328-
result.extend(
329-
branch_names
330-
.iter()
331-
.map(|(_branch, commit_oid)| (*commit_oid, UpdateStatus::Updated)),
332-
);
328+
result.extend(branch_names.iter().map(|(branch, commit_oid)| {
329+
(
330+
*commit_oid,
331+
UpdateStatus::Updated {
332+
local_commit_name: branch.to_owned(),
333+
},
334+
)
335+
}));
333336
}
334337

335338
Ok(Ok(result))

git-branchless-submit/src/github.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,15 @@ impl Forge for GithubForge<'_> {
491491
progress.notify_progress_inc(1);
492492

493493
// FIXME: report push/update errors
494-
result.insert(commit_oid, UpdateStatus::Updated);
494+
result.insert(
495+
commit_oid,
496+
UpdateStatus::Updated {
497+
local_commit_name: commit_status
498+
.local_commit_name
499+
.clone()
500+
.unwrap_or_else(|| commit_oid.to_string()),
501+
},
502+
);
495503
}
496504
}
497505

0 commit comments

Comments
 (0)