Repository navigation
fix(topic): join and leave run post_sync - #10
Merged
Merged
Conversation
A join or leave places a checkout, and the docs say post_sync runs at the end of every placement, but join_or_leave placed through the Placer directly and never ran it. Whatever post_sync sets up for the workspace's checkouts missed the one that had just been joined. It now runs once a join or leave succeeds for every named checkout, and not when one fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q7zEtUTmJTS7ehno23nEG6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
post_syncis documented to run at the end of every placement, andgit topic joinandleaveplace a checkout, but neither ran it:join_or_leaveplaces through thePlacerdirectly rather than throughsync::place, which is where the hook lives. So whateverpost_syncsets up for the workspace's checkouts (installing, generating, listing them) missed the checkout that had just been joined, until the next sync.Now
join_or_leaverunspost_synconce at the end, when at least one named checkout was joined or left and none failed. A failed join runs nothing, matchingsync.--dependantswith nothing to join runs nothing either.src/commands/topic.rs: the call, after the failure check.docs/hooks.md:git topic joinandleaveadded to the placements that run it.tests/it/topic.rs:normal_067_join_and_leave_run_post_synccounts the runs across a join, a leave and a failed join. It fails without the fix (left: 1, right: 2on the join).Tests:
cargo fmt --check,cargo clippy --locked --all-targets -- -D warnings, andcargo test --locked(655 integration and 172 unit tests pass). Run from a checkout nested inside another gitscale workspace, five "outside a workspace" tests fail because the playground underCARGO_MANIFEST_DIRfinds the outer workspace; that's independent of this change, and they pass from a standalone copy.https://claude.ai/code/session_01Q7zEtUTmJTS7ehno23nEG6
🤖 Generated with Claude Code