Skip to content

fix(jj): prevent panic when removing a workspace#7

Merged
endoze merged 1 commit into
masterfrom
fix/workspace-remove-panic
May 29, 2026
Merged

fix(jj): prevent panic when removing a workspace#7
endoze merged 1 commit into
masterfrom
fix/workspace-remove-panic

Conversation

@endoze
Copy link
Copy Markdown
Owner

@endoze endoze commented May 29, 2026

Removing a freshly created workspace panicked inside jj-lib. A new
workspace's working-copy commit is an empty head, so forgetting it
abandons that commit and leaves its descendants needing a rebase. The
transaction was committed without that rebase, tripping an internal
assertion.

Call rebase_descendants() after remove_wc_commit() in both the forget
and rename paths before committing the transaction. Rename had the same
latent gap and is fixed alongside. Adds an e2e regression test that
creates and then removes a workspace.

Removing a freshly created workspace panicked inside jj-lib. A new
workspace's working-copy commit is an empty head, so forgetting it
abandons that commit and leaves its descendants needing a rebase. The
transaction was committed without that rebase, tripping an internal
assertion.

Call rebase_descendants() after remove_wc_commit() in both the forget
and rename paths before committing the transaction. Rename had the same
latent gap and is fixed alongside. Adds an e2e regression test that
creates and then removes a workspace.
@endoze endoze force-pushed the fix/workspace-remove-panic branch from f97c125 to d480001 Compare May 29, 2026 15:23
@endoze endoze force-pushed the feat/stream-hook-output branch from 8215f03 to 62afd13 Compare May 29, 2026 15:23
Base automatically changed from feat/stream-hook-output to master May 29, 2026 15:47
@endoze endoze merged commit ed91c1d into master May 29, 2026
14 of 15 checks passed
@endoze endoze deleted the fix/workspace-remove-panic branch May 29, 2026 15:48
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