Skip to content

Commit

Permalink
feat(submit:phabricator): do not abort entire process on failure
Browse files Browse the repository at this point in the history
Currently, `git submit` for Phabricator will abort the entire operation if any commit fails to be submitted. This means that if `arc diff` succeeds on one commit and then fails on its child, the entire operation is aborted. However, the first `arc diff` had side effects, so the user gets diffs uploaded to Phabricator that are not reflected locally. Instead, we should confirm any passing commits and abort after we get a failing commit. This commit updates the Phabricator forge to handle the error case better and not produce garbage commits on Phabricator.
  • Loading branch information
arxanas committed Feb 27, 2024
1 parent 74f77c1 commit 70ae23b
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 1,651 deletions.
1 change: 0 additions & 1 deletion git-branchless-lib/src/core/eventlog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,6 @@ INSERT INTO event_log VALUES (
///
/// Returns: All the events in the database, ordered from oldest to newest.
#[instrument]

pub fn get_events(&self) -> eyre::Result<Vec<Event>> {
let mut stmt = self.conn.prepare(
"
Expand Down
2 changes: 1 addition & 1 deletion git-branchless-submit/src/branch_forge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ These remotes are available: {}",
commit_status.local_commit_name.map(|local_commit_name| {
(
commit_oid,
CreateStatus {
CreateStatus::Created {
final_commit_oid: commit_oid,
local_commit_name,
},
Expand Down
Loading

0 comments on commit 70ae23b

Please sign in to comment.