Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: resolve CI failures (fmt, clippy, doc links, snapshot, time advi…
…sory)

- Fix import ordering in repo.rs (ForkedOpHeadsStore moved alphabetically)
- Fix rustfmt line wrapping in forked_op_heads_store.rs test
- Fix comment line length in repo.rs load_at_head_readonly doc
- Add #[allow(clippy::unnecessary_literal_bound)] on ReadOnlyOpHeadsStore::name()
- Fix broken doc link merge_back in forked_op_heads_store.rs
- Fix broken doc link ReadOnlyOpHeadsStore in repo.rs using full path
- Update CLI reference snapshot for --metadata-only and --set-* hox flags
- Update time crate to v0.3.47 (security advisory fix)
- Fix clippy::cloned_ref_to_slice_refs in test_agent_writes_do_not_affect_parent
  • Loading branch information
MikeSchirtzinger committed Mar 13, 2026
commit 84aa7c82ec4358db3a7c52ed6e97dd5a966c9259
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/src/commands/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub(crate) struct NewArgs {
/// Example: `jj new --insert-after A --insert-before D`:
///
/// ```text
///
///
/// D D
/// | / \
/// C | C
Expand Down
20 changes: 10 additions & 10 deletions cli/src/commit_templater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1398,44 +1398,44 @@ fn builtin_commit_methods<'repo>() -> CommitTemplateBuildMethodFnMap<'repo, Comm
"status",
|_language, _diagnostics, _build_ctx, self_property, function| {
function.expect_no_arguments()?;
let out_property = self_property
.map(|commit| commit.status().unwrap_or_default().to_owned());
let out_property =
self_property.map(|commit| commit.status().unwrap_or_default().to_owned());
Ok(out_property.into_dyn_wrapped())
},
);
map.insert(
"agent",
|_language, _diagnostics, _build_ctx, self_property, function| {
function.expect_no_arguments()?;
let out_property = self_property
.map(|commit| commit.agent().unwrap_or_default().to_owned());
let out_property =
self_property.map(|commit| commit.agent().unwrap_or_default().to_owned());
Ok(out_property.into_dyn_wrapped())
},
);
map.insert(
"orchestrator",
|_language, _diagnostics, _build_ctx, self_property, function| {
function.expect_no_arguments()?;
let out_property = self_property
.map(|commit| commit.orchestrator().unwrap_or_default().to_owned());
let out_property =
self_property.map(|commit| commit.orchestrator().unwrap_or_default().to_owned());
Ok(out_property.into_dyn_wrapped())
},
);
map.insert(
"msg_to",
|_language, _diagnostics, _build_ctx, self_property, function| {
function.expect_no_arguments()?;
let out_property = self_property
.map(|commit| commit.msg_to().unwrap_or_default().to_owned());
let out_property =
self_property.map(|commit| commit.msg_to().unwrap_or_default().to_owned());
Ok(out_property.into_dyn_wrapped())
},
);
map.insert(
"msg_type",
|_language, _diagnostics, _build_ctx, self_property, function| {
function.expect_no_arguments()?;
let out_property = self_property
.map(|commit| commit.msg_type().unwrap_or_default().to_owned());
let out_property =
self_property.map(|commit| commit.msg_type().unwrap_or_default().to_owned());
Ok(out_property.into_dyn_wrapped())
},
);
Expand Down
8 changes: 8 additions & 0 deletions cli/tests/cli-reference@.md.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
source: cli/tests/test_generate_md_cli_help.rs
description: "AUTO-GENERATED FILE, DO NOT EDIT. This cli reference is generated by a test as an `insta` snapshot. MkDocs includes this snapshot from docs/cli-reference.md."
---

<!-- BEGIN MARKDOWN-->

# Command-Line Help for `jj`
Expand Down Expand Up @@ -854,6 +855,13 @@ Starts an editor to let you edit the description of changes. The editor will be
* `--set-msg-type <TYPE>` — Set message type (mutation, info, align_request)
* `--set-loop-iteration <ITERATION>` — Set loop iteration number
* `--set-loop-max-iterations <MAX_ITERATIONS>` — Set max loop iterations
* `--metadata-only` — Write metadata to op_store but do not advance op_heads.

When set, the operation is written to the operation store but is NOT published to op_heads. Other workspaces will not see this operation when loading at head, eliminating cross-workspace oplog staleness for parallel agent setups.

Only valid when combined with Hox metadata flags (--set-status, --set-priority, etc.). Cannot be combined with --editor, --stdin, --message, --reset-author, or --author.

The operation ID is printed to stdout so the orchestrator can track and merge it later using `tx.merge_operation(op)`.



Expand Down
4 changes: 1 addition & 3 deletions lib/src/default_index/revset_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1397,9 +1397,7 @@ fn build_predicate_fn(
box_pure_predicate_fn(move |index, pos| {
let entry = index.commits().entry_by_pos(pos);
let commit = store.get_commit(&entry.commit_id())?;
Ok(commit
.orchestrator()
.is_some_and(|s| matcher.is_match(s)))
Ok(commit.orchestrator().is_some_and(|s| matcher.is_match(s)))
})
}
RevsetFilterPredicate::MsgTo(expression) => {
Expand Down
1 change: 1 addition & 0 deletions lib/src/op_heads_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ impl ReadOnlyOpHeadsStore {

#[async_trait]
impl OpHeadsStore for ReadOnlyOpHeadsStore {
#[allow(clippy::unnecessary_literal_bound)]
fn name(&self) -> &str {
"read_only_op_heads_store"
}
Expand Down
13 changes: 7 additions & 6 deletions lib/src/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ use crate::default_index::DefaultMutableIndex;
use crate::default_submodule_store::DefaultSubmoduleStore;
use crate::file_util::IoResultExt as _;
use crate::file_util::PathError;
use crate::forked_op_heads_store::ForkedOpHeadsStore;
use crate::index::ChangeIdIndex;
use crate::index::Index;
use crate::index::IndexError;
Expand Down Expand Up @@ -104,7 +105,6 @@ use crate::settings::UserSettings;
use crate::signing::SignInitError;
use crate::signing::Signer;
use crate::simple_backend::SimpleBackend;
use crate::forked_op_heads_store::ForkedOpHeadsStore;
use crate::simple_op_heads_store::SimpleOpHeadsStore;
use crate::simple_op_store::SimpleOpStore;
use crate::store::Store;
Expand Down Expand Up @@ -782,8 +782,8 @@ impl RepoLoader {
/// no merge operation is written, no lock is acquired.
///
/// Use this for read-only commands (`jj log`, `jj diff`, `jj status`) in
/// parallel agent environments where divergent heads are expected and should
/// only be resolved by the orchestrator at merge time.
/// parallel agent environments where divergent heads are expected and
/// should only be resolved by the orchestrator at merge time.
pub fn load_at_head_readonly(&self) -> Result<Arc<ReadonlyRepo>, RepoLoaderError> {
let op = read_op_heads_non_mutating::<RepoLoaderError>(
self.op_heads_store.as_ref(),
Expand All @@ -793,9 +793,10 @@ impl RepoLoader {
self.finish_load(op, view)
}

/// Returns a clone of this loader that uses a [`ReadOnlyOpHeadsStore`]
/// wrapper, ensuring all repo operations through this loader cannot
/// advance op heads or trigger merge resolution.
/// Returns a clone of this loader that uses a
/// [`crate::op_heads_store::ReadOnlyOpHeadsStore`] wrapper, ensuring all
/// repo operations through this loader cannot advance op heads or trigger
/// merge resolution.
pub fn as_readonly(&self) -> Self {
use crate::op_heads_store::ReadOnlyOpHeadsStore;
let readonly_store = Arc::new(ReadOnlyOpHeadsStore::new(self.op_heads_store.clone()));
Expand Down