Skip to content

Commit 70ae23b

Browse files
committed
feat(submit:phabricator): do not abort entire process on failure
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.
1 parent 74f77c1 commit 70ae23b

File tree

7 files changed

+84
-1651
lines changed

7 files changed

+84
-1651
lines changed

Diff for: git-branchless-lib/src/core/eventlog.rs

-1
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,6 @@ INSERT INTO event_log VALUES (
580580
///
581581
/// Returns: All the events in the database, ordered from oldest to newest.
582582
#[instrument]
583-
584583
pub fn get_events(&self) -> eyre::Result<Vec<Event>> {
585584
let mut stmt = self.conn.prepare(
586585
"

Diff for: git-branchless-submit/src/branch_forge.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ These remotes are available: {}",
247247
commit_status.local_commit_name.map(|local_commit_name| {
248248
(
249249
commit_oid,
250-
CreateStatus {
250+
CreateStatus::Created {
251251
final_commit_oid: commit_oid,
252252
local_commit_name,
253253
},

0 commit comments

Comments
 (0)