diff --git a/docs/editing.md b/docs/editing.md index ee35195..29b1239 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -408,6 +408,8 @@ Conflicted jj revisions also discover files without reading every blob. Ordinary **Selected jj bookmarks follow their locally known targets automatically**, checked on the same one-second interval, including inactive tabs and with `config.diff_follow_working_copy = false`. Local bookmarks and known remote-tracking bookmarks retain their names; explicit revision selections remain pinned. A changed commit ID, including an amendment of the same change ID, rebuilds the comparison. Branch changes also recomputes the merge base. Unrelated endpoints stay frozen, except for the existing Working After forward-follow behavior. Deleted or conflicted bookmarks keep the last successful comparison visible with an error; a later successful check clears the error. These checks never fetch, contact remotes, or snapshot jj's working copy; privately loaded remote history and advertised remote selections remain frozen. +Deleted or conflicted bookmarks unrelated to the selected endpoints do not block opening or refreshing a comparison. + **Pinned After editability tracks the checkout without moving either endpoint**, checked asynchronously once per second, including inactive tabs and when `config.diff_follow_working_copy = false`. Git matches the selected commit to HEAD; jj matches its change ID so snapshot/description rewrites of the same change remain editable. A matching After uses the shared live buffer. Switching away restores the original read-only After snapshot; switching back reuses the live buffer's unsaved edits and undo history. A failed checkout check revokes pinned After editing until a successful check restores eligibility. Refresh retains the selected path when still present, explorer query/view/visibility, logical text-side focus, and split/unified/orientation/wrap choices; moving a Working or bookmark endpoint clears review marks, while pinned checkout-only transitions retain them. Removed selections fall back to the first changed file. Bookmark replacements preserve/clamp cursor and scroll positions as replacement content loads. Failed refreshes keep the previous comparison visible. Superseded file loads and LSP navigation cannot apply to the new comparison; snapshots still displayed in other panes or tabs remain read-only. diff --git a/src/repository.rs b/src/repository.rs index ef9b9dd..d218e5c 100644 --- a/src/repository.rs +++ b/src/repository.rs @@ -1685,7 +1685,7 @@ impl Repository { } // Resolve both endpoints from one operation, comparing raw names rather // than interpreting bookmark names as revsets or splitting on '@'. - let template = r#""[" ++ json(name) ++ "," ++ json(remote) ++ "," ++ json(conflict) ++ "," ++ if(conflict, "null", json(normal_target.commit_id())) ++ "]\n""#; + let template = r#""[" ++ json(name) ++ "," ++ json(remote) ++ "," ++ json(conflict) ++ "," ++ if(normal_target, json(normal_target.commit_id()), "null") ++ "]\n""#; let output = text(self.jj( &self.root, &["bookmark", "list", "--all-remotes", "-T", template], diff --git a/tests/repository.rs b/tests/repository.rs index 348baec..19e3835 100644 --- a/tests/repository.rs +++ b/tests/repository.rs @@ -1010,6 +1010,7 @@ fn jj_known_remote_bookmark_refreshes_locally_but_private_catalog_entries_stay_f fs::write(source.join("file"), "first\n").unwrap(); jj(&source, &["describe", "-m", "first"]); jj(&source, &["bookmark", "create", "topic"]); + jj(&source, &["bookmark", "create", "deleted"]); jj(&source, &["git", "export"]); let root = fixture.dir("active"); init_jj(&root, false); @@ -1033,6 +1034,8 @@ fn jj_known_remote_bookmark_refreshes_locally_but_private_catalog_entries_stay_f }) .unwrap(); jj(&root, &["git", "fetch", "--remote", "origin"]); + jj(&root, &["bookmark", "track", "deleted@origin"]); + jj(&root, &["bookmark", "delete", "deleted"]); let catalog = repository.catalog().unwrap(); let remote = catalog .entries