Skip to content

Conversation

@javoire
Copy link
Owner

@javoire javoire commented Dec 16, 2025

Fixes an issue where stack sync wouldn't update branches to the latest base branch (e.g., master) in certain configurations.

Problem:
When rebasing onto a base branch like origin/master, the sync relied on the general git fetch origin to update the tracking ref. However, in repos with limited refspecs or certain git configurations, this fetch may not reliably update origin/master.

Solution:
Explicitly fetch the base branch using FetchBranch() right before rebasing onto it. This ensures the tracking ref is always up-to-date before the rebase.

The fetch is non-fatal, so if it fails (e.g., network issues), the sync continues with the existing ref.

@javoire javoire closed this Dec 19, 2025
@javoire javoire force-pushed the fix/sync-fetch-base-branch branch from 40d40a4 to c815e9b Compare December 19, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants