Skip to content

Commit

Permalink
feat(submit): print submit status for each commit individually
Browse files Browse the repository at this point in the history
  • Loading branch information
arxanas committed May 27, 2024
1 parent 13352d8 commit c311556
Show file tree
Hide file tree
Showing 7 changed files with 317 additions and 315 deletions.
13 changes: 8 additions & 5 deletions git-branchless-submit/src/branch_forge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,14 @@ These remotes are available: {}",
progress.notify_progress_inc(branch_names.len());

// FIXME: report push errors
result.extend(
branch_names
.iter()
.map(|(_branch, commit_oid)| (*commit_oid, UpdateStatus::Updated)),
);
result.extend(branch_names.iter().map(|(branch, commit_oid)| {
(
*commit_oid,
UpdateStatus::Updated {
local_commit_name: branch.to_owned(),
},
)
}));
}

Ok(Ok(result))
Expand Down
10 changes: 9 additions & 1 deletion git-branchless-submit/src/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,15 @@ impl Forge for GithubForge<'_> {
progress.notify_progress_inc(1);

// FIXME: report push/update errors
result.insert(commit_oid, UpdateStatus::Updated);
result.insert(
commit_oid,
UpdateStatus::Updated {
local_commit_name: commit_status
.local_commit_name
.clone()
.unwrap_or_else(|| commit_oid.to_string()),
},
);
}
}

Expand Down
Loading

0 comments on commit c311556

Please sign in to comment.