Skip to content

Commit ad647f6

Browse files
committed
sync/git(fix[update_repo]): Return early on invalid-upstream rebase
why: The invalid_upstream handler recorded the error (ok=False) but fell through to stash pop, creating inconsistent state. what: - Add return result after add_error in the invalid_upstream branch
1 parent d258e69 commit ad647f6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/libvcs/sync/git.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ def update_repo(
576576
if any(msg in str(e) for msg in ["invalid_upstream", "Aborting"]):
577577
self.log.exception("Invalid upstream remote. Rebase aborted.")
578578
result.add_error("rebase", str(e), exception=e)
579+
return result
579580
else:
580581
# Rebase failed: Restore previous state.
581582
with contextlib.suppress(exc.CommandError):

0 commit comments

Comments
 (0)