From 240f25f42827eb92e76beeac73fcd029e7fe79ba Mon Sep 17 00:00:00 2001 From: Stefan Pratter Date: Wed, 11 Mar 2026 13:25:24 +0000 Subject: [PATCH 1/2] pull before push when finalizing eph git context --- src/ctl/util/git.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ctl/util/git.py b/src/ctl/util/git.py index 24e42bc..82a156e 100644 --- a/src/ctl/util/git.py +++ b/src/ctl/util/git.py @@ -1148,6 +1148,12 @@ def finalize(self, exc_type, exc_val, exc_tb): self.git_manager.changed_files(self.state.files_to_add) ) self.git_manager.commit(self.state.commit_message) + # Pull to integrate any remote changes before pushing, + # avoiding rejection when concurrent processes have + # pushed to the same branch + # If this fails due to conflicts, push would have also failed. + if not self.state.force_push: + self.git_manager.pull() # Attempt to push self.git_manager.push(force=self.state.force_push) From fb9f16c7ebc50f1518d05d06ad1f06ed2adc97ed Mon Sep 17 00:00:00 2001 From: Stefan Pratter Date: Wed, 11 Mar 2026 13:34:22 +0000 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 2 ++ CHANGELOG.yaml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce3a965..7bf4852 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +### Fixed +- ephemeral git context push rejection when concurrent processes push to the same branch - pull before push to integrate remote changes ## 1.2.0 diff --git a/CHANGELOG.yaml b/CHANGELOG.yaml index 087f4eb..d8f7ace 100644 --- a/CHANGELOG.yaml +++ b/CHANGELOG.yaml @@ -1,6 +1,7 @@ Unreleased: added: [] - fixed: [] + fixed: + - ephemeral git context push rejection when concurrent processes push to the same branch - pull before push to integrate remote changes changed: [] deprecated: [] removed: []