Skip to content

Guard recursive update for undefined SQUASH_COMMIT#9

Merged
Phlogistique merged 1 commit into
mainfrom
claude/guard-squash-commit-undefined-US3nC
Dec 25, 2025
Merged

Guard recursive update for undefined SQUASH_COMMIT#9
Phlogistique merged 1 commit into
mainfrom
claude/guard-squash-commit-undefined-US3nC

Conversation

@Phlogistique
Copy link
Copy Markdown
Collaborator

In conflict-resolved mode, SQUASH_COMMIT is never initialized (git update-ref SQUASH_COMMIT only happens in main()), causing skip_if_clean to crash with "invalid object name" when update_branch_recursive processes grandchildren branches.

Add a guard to check if the SQUASH_COMMIT ref exists before attempting to use it. If the ref doesn't exist, return false to indicate the branch needs updating.

Also add feature4 branch to e2e tests to verify grandchildren are properly updated during conflict resolution continuation workflow.

@Phlogistique Phlogistique force-pushed the claude/guard-squash-commit-undefined-US3nC branch 2 times, most recently from 45f351e to 3d42e54 Compare December 25, 2025 10:06
Extract is_base_ancestor() for simple ancestry checks that work in all
modes. Rename skip_if_clean to has_squash_commit for clarity - it
returns a boolean, not performs an action.

update_indirect_target now uses is_base_ancestor() since indirect
targets only need to verify their parent is already an ancestor.

has_squash_commit remains for direct targets in squash-merge mode,
where checking both base ancestry AND squash commit presence is needed.

Also add feature4 branch to e2e tests to verify grandchildren are
properly updated during conflict resolution continuation workflow.
@Phlogistique Phlogistique force-pushed the claude/guard-squash-commit-undefined-US3nC branch from 3d42e54 to ea1f0bb Compare December 25, 2025 10:10
@Phlogistique Phlogistique merged commit 66a0439 into main Dec 25, 2025
2 checks passed
@github-actions github-actions Bot deleted the claude/guard-squash-commit-undefined-US3nC branch December 25, 2025 10:13
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