Repository navigation
fix(git): reject bookmark-track for missing bookmark or remote - #660
Merged
Merged
Conversation
jj_bookmark_track now errors when the remote is not configured or the remote bookmark does not exist, instead of recording tracking for an absent ref. Push skips the tracking step for branches not yet on origin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MxqTt1WtVRKkjNXQpgkJS9
The old unit test tracked main@origin in a repo with no origin remote, which is the @nonremote tracking this PR removes. jj-lib's push marks pushed bookmarks tracked, so tracking before the first push is unneeded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MxqTt1WtVRKkjNXQpgkJS9
Ziinc
commented
Oct 2, 2026
Ziinc
left a comment
Collaborator
Author
There was a problem hiding this comment.
Review at 0fd6dc0d: Reviewed remote/bookmark existence validation, first-push handling, and success/failure regression coverage. No actionable correctness or code-quality issues found in this diff.
Validation: static review of the diff, surrounding implementation and tests; PR-head CI reports success. Rust/integration tests were not rerun locally because this environment has no Cargo toolchain.
rename_workspace refuses names that already exist on origin, and jj_bookmark_track now rejects a missing remote bookmark, so the best-effort re-track could only fail and its error was discarded. The first push tracks the renamed bookmark. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E1poGWXMSFcPsJ8V5gujWG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E1poGWXMSFcPsJ8V5gujWG
This branch was successfully deployed
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.
git bookmark-trackwith an unknown bookmark or remote returned success and recorded tracking for an absent ref (e.g.@nonremote).jj_bookmark_tracknow errors with "Remote '' not found" or "Remote bookmark '@' not found" and changes nothing.jj_pushskips the tracking step for branches not yet on origin, so first pushes don't gain a spurious warning.tests/jj_bookmark_track_test.rscovers missing bookmark, missing remote, and the existing-bookmark success path.🤖 Generated with Claude Code
https://claude.ai/code/session_01MxqTt1WtVRKkjNXQpgkJS9
Generated by Claude Code