Skip to content

fix: separate Sapling override from auto-detected default branch#346

Merged
tomasz-tomczyk merged 1 commit intomainfrom
fix/sapling-override-semantics
Apr 24, 2026
Merged

fix: separate Sapling override from auto-detected default branch#346
tomasz-tomczyk merged 1 commit intomainfrom
fix/sapling-override-semantics

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • Add separate overrideBranch field to SaplingVCS to track explicit overrides independently from auto-detected defaultBranch
  • GetDefaultBranchOverride() now returns empty string when no override is set, matching GitVCS behavior
  • Fixes ChangeBaseBranch rollback path which would previously turn the auto-detected branch into an explicit override, preventing future auto-detection

Test plan

  • go build ./... — compiles clean
  • go vet ./... — no issues
  • TestSaplingVCS_DefaultBranchOverride — passes
  • All tests pass in CI

🤖 Generated with Claude Code

SaplingVCS.GetDefaultBranchOverride() was returning the auto-detected
branch when no override was set, unlike GitVCS which returns empty
string. This caused ChangeBaseBranch rollback to set the detected
value as an explicit override, preventing future auto-detection.

Add a separate overrideBranch field to track explicit overrides
independently from the detected defaultBranch value.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit 91f1c89 into main Apr 24, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the fix/sapling-override-semantics branch April 24, 2026 08:41
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.

1 participant