jj-vcs/jj
66.9
Adequate · 11 October 2026
139.1k
lines of production code
Rust
primary language
4
measurements over time
What this system is
This system is Jujutsu, a distributed version control system implemented in Rust that provides a modern, extensible command-line interface for managing code repositories. It supports core version control operations such as commit management, branching, merging, and conflict resolution, while offering advanced features like automated bisection, sparse checkouts, and integration with Git and Gerrit. The architecture emphasizes modularity and performance, featuring a pluggable backend system, a built-in interactive diff editor, and a robust internal engine for handling revision sets and operation logs.
How it got here
2020–2023 — Core architecture and test infrastructure overhaul
35 changes.
This period focused on establishing the foundational development environment, dependency management, and internal storage schemas for the Jujutsu version control system. Significant effort was dedicated to restructuring the CLI into modular, asynchronous components and implementing a robust, cross-platform locking mechanism. The work culminated in a massive expansion and modernization of the test suite, migrating tests to a new API and the gitoxide backend to ensure reliability across the new architecture.
2024–2026 — CLI modularization and core consolidation
20 changes.
This period focused on restructuring the CLI by splitting monolithic commands into modular subcommand files and introducing new capabilities for file, operation, workspace, and configuration management. Simultaneously, the codebase underwent significant architectural consolidation by centralizing core logic into the jj-core crate and domain-specific language parsing into jj-dsl, while adding extensive new features for benchmarking, debugging, and external integrations.
Features
Add \`jj bisect run\` command for automated bisection
Users can now use the new \jj bisect run\ command to automatically find the first bad (or good, with \--find-good\) revision in a range by running a provided command against each candidate. The command supports positional arguments for the command and its arguments (replacing the deprecated \--command\ flag), allows skipping pre-bisection checks via \--trust-endpoints\, and displays remaining revisions and estimated steps during execution.
cli/src/commands/bisect · high confidence
Add custom commit templater example with revset extensions
The repository now includes a new example at cli/examples/custom-commit-templater that demonstrates how to extend the commit templating and revset systems. This example implements a custom template language extension (HexCounter) that adds functions like has\_most\_digits, num\_digits\_in\_id, and num\_char\_in\_id to commit templates, and a revset filter extension (EvenDigitsFilter) that allows filtering commits by the parity of digit counts in their IDs. It also showcases the SymbolResolverExtension trait by implementing a resolver for the 'thedigitest' symbol.
cli/examples/custom-commit-templater · high confidence
Add custom operation templater example with hex-digit counting functions
The repository now includes an example demonstrating how to extend the operation templating language with custom functions. This example registers a \HexCounter\ extension that adds two new methods to operation templates: \num\_digits\_in\_id\, which counts the number of ASCII digits in an operation's ID, and \num\_char\_in\_id\, which counts occurrences of a specific character. Users can study this code to learn how to implement \OperationTemplateLanguageExtension\ and integrate custom logic into the CLI's templating system.
cli/examples/custom-operation-templater · high confidence
Add custom working-copy example with conflict tracking
The \cli/examples/custom-working-copy\ directory now contains a new example demonstrating how to implement and register a custom working-copy type. This example introduces a \ConflictsWorkingCopy\ that wraps the standard local working copy to automatically maintain a \.conflicts\ file listing unresolved conflicts. It shows users how to register this custom factory via \CliRunner\, initialize workspaces using it, and extend the CLI with custom subcommands like \init-conflicts\.
cli/examples/custom-working-copy · high confidence
Added CLI example commands for custom subcommands and global flags
The repository now includes example implementations for extending the CLI, located in cli/examples/. The custom-command example demonstrates how to register a new subcommand (Frobnicate) that accepts a revision argument, resolves it, rewrites the commit, and outputs status messages. The custom-global-flag example shows how to add a global flag (greet) that processes arguments before command execution. These examples illustrate the current API for building custom CLI extensions, including async command handling and UI interaction.
cli/examples/custom-command · high confidence
Initial project configuration and development environment setup
The repository is initialized with essential configuration files to standardize development and build processes. An \.editorconfig\ is added to enforce consistent line endings, indentation, and whitespace trimming across editors, with specific overrides for Rust files. A \rustfmt.toml\ configures the Rust code formatter with edition 2024, item-level import granularity, and string formatting rules. The Nix development environment is defined via \default.nix\ and \flake.nix\, setting up the Rust toolchain, build dependencies (like \mold\ on Linux), and shell completions. Additionally, \.gitignore\ and \.gitattributes\ are configured to exclude build artifacts and generated files, while \.watchmanconfig\ sets up filesystem monitoring for the project.
(repo-wide) · high confidence
Introduce \`jj gerrit upload\` command for submitting changes to Gerrit
Users can now submit changes to a Gerrit server using the new \jj gerrit upload\ command. This feature allows uploading revisions to a specified remote branch, automatically generating and attaching \Change-Id\ trailers to commits that lack them, and supporting Gerrit-specific push options such as reviewers, labels, topics, and hashtags. The command handles both new changes and updates to existing ones based on the \Change-Id\, and provides options for dry runs, change edits, and marking changes as WIP or private.
cli/src/commands/gerrit · high confidence
Introduction of the jj-core crate with foundational modules
The \jj-core\ crate has been introduced to centralize core functionality previously scattered across \jj-lib\. This change consolidates foundational modules including \backend\, \commit\, \conflict\_labels\, \content\_hash\, \copies\, \dag\_walk\, \diff\, \file\_util\, \graph\, \hex\_util\, \index\, \merge\, \object\_id\, \op\_store\, \repo\_path\, \revset\_backend\, \str\_util\, \symbol\_util\, \time\_util\, and \tree\ into a single, unified crate. It also adds a \ContentHash\ derive macro for portable, stable hashing and includes benchmarking infrastructure for the diff module.
core/src · high confidence
New \`jj bookmark advance\` command for bulk forward-moving bookmarks
A new \jj bookmark advance\ subcommand has been added to the \bookmark\ command group. It allows users to move multiple bookmarks forward to a target revision (defaulting to the current working copy \@\) based on a configurable source revset (defaulting to \heads(::to & bookmarks())\). The command checks that all moves are strictly forward (fast-forward) and refuses to move bookmarks backwards or sideways unless the target is empty. It supports filtering by specific bookmark name patterns and respects the \revsets.bookmark-advance-to\ and \revsets.bookmark-advance-from\ configuration settings.
cli/src/commands/bookmark · high confidence
New \`jj file\` command with subcommands for file operations
The \jj file\ command is introduced as a new top-level command that groups file-related operations into subcommands: \annotate\ (show source changes for each line), \chmod\ (set or remove the executable bit), \delete\ (remove files from a revision), \edit\ (open a file in an editor and save changes back to a revision), \list\ (list files in a revision), \search\ (search for content in files), \show\ (print file contents), \track\ (start tracking paths in the working copy), and \untrack\ (stop tracking paths). This consolidates previously scattered file commands into a single namespace.
cli/src/commands/file · high confidence
New \`jj util\` subcommands for backend inspection, file diffing, and script execution
The \jj util\ command group now includes several new subcommands to support advanced workflows and scripting. \jj util backend name\ prints the name of the repository's current backend. \jj util diff\ allows comparing two arbitrary files on disk using the same formatting options as standard diffs. \jj util exec\ provides a way to run external commands via aliases, exposing the \JJ\_WORKSPACE\_ROOT\ environment variable. Additionally, \jj util snapshot\ offers explicit control over working-copy snapshots for scripts, while \jj util gc\ and \jj util completion\ remain available for garbage collection and shell integration respectively.
cli/src/commands/util · high confidence
New built-in diff and merge editor
A new built-in diff and merge editor is now available via the \:builtin\ tool name, implemented in the new \cli/src/merge\_tools\ module. This editor leverages the \scm-record\ library to provide an interactive, file-by-file interface for reviewing and resolving conflicts, replacing the previous reliance on external text editors or diff tools for these operations. The implementation supports handling text and binary files, preserving executable bits, and managing conflict markers, offering a native, zero-dependency-on-external-software experience for diff editing and conflict resolution.
_cli/src/merge\tools · high confidence
New cross-platform advisory file locking with non-blocking support
The library now includes a new \lock\ module that provides platform-specific advisory file locking: it uses \rustix\ flock on Unix and standard \File::lock()\ on Windows. This change introduces a \try\_lock()\ primitive that allows callers to attempt acquiring a lock without blocking (returning \None\ if unavailable), alongside the existing blocking \lock()\ method. The implementation includes robust retry logic for transient errors like ESTALE on Unix and ERROR\_SHARING\_VIOLATION on Windows, ensuring reliable lock acquisition even when files are being deleted or held by other processes.
lib/src/lock · high confidence
New custom-backend example demonstrates JitBackend integration
The \cli/examples/custom-backend\ directory now contains a complete example (\main.rs\) showing how to register and use a custom backend named 'jit'. This example registers the \JitBackend\ (which wraps the standard \GitBackend\) via \StoreFactories\, adds a custom CLI subcommand (\init-jit\) to initialize workspaces with this backend, and implements the full \Backend\ trait interface including async file, tree, commit, and copy-history operations.
cli/examples/custom-backend · high confidence
New demo scripts and assets for Git compatibility, conflict resolution, and operation logs
The demos directory now includes a README and a set of new shell scripts (demo\_git\_compat.sh, demo\_juggle\_conflicts.sh, demo\_operation\_log.sh, demo\_resolve\_conflicts.sh, demo\_working\_copy.sh) along with their corresponding SVG and PNG screenshots. These demos illustrate key workflows: cloning a Git repository and managing bookmarks, handling and merging conflicting commits, using the operation log to revert or restore previous states, and resolving file conflicts after a rebase.
demos · high confidence
New diff presentation utilities for unified diffs
The \lib/src/diff\_presentation\ module has been introduced to centralize utilities for presenting file diffs to users. This includes logic for detecting binary files, comparing content with various whitespace modes (exact, ignore all space, ignore space change), and generating Git-style unified diffs. The module also handles the materialization of file contents, including support for conflicts with labels, providing a structured \GitDiffPart\ representation that includes file mode, hash, and content.
_lib/src/diff\presentation · high confidence
New internal benchmarking commands for commit graph and revset operations
The CLI now includes a hidden \bench\ command suite that allows users to measure the performance of core internal operations. This suite adds four specific benchmarks: \common-ancestors\ to time finding shared history between two commits, \is-ancestor\ to check ancestry relationships, \resolve-prefix\ to benchmark short-commit-ID resolution, and \revset\ to evaluate and iterate through revision sets (either provided directly or read from a file). These tools help track performance regressions in the index and revset evaluation logic.
cli/src/commands/bench · high confidence
New sparse command subcommands for managing working copy paths
The sparse command now includes four new subcommands: \edit\, \list\, \reset\, and \set\. The \edit\ subcommand opens an interactive editor to modify the list of paths present in the working copy. The \list\ subcommand displays the current sparse patterns. The \reset\ subcommand restores the default pattern to include all files. The \set\ subcommand allows users to explicitly add, remove, or clear specific paths from the working copy using \--add\, \--remove\, and \--clear\ flags.
cli/src/commands/sparse · high confidence
New subcommands for managing tags: set, delete, list, track, and untrack
The \jj tag\ command now includes dedicated subcommands to manage tags more granularly. You can create or update tags with \jj tag set\ (using \--allow-move\ to update existing tags), remove tags with \jj tag delete\, and view them with \jj tag list\ which supports filtering by revision (\-r\), remote status (\--tracked\, \--conflicted\, \--all-remotes\), and sorting. Additionally, \jj tag track\ and \jj tag untrack\ allow you to control which remote tags are automatically imported as local tags during pulls, supporting both glob patterns and specific \TAG@REMOTE\ symbols.
cli/src/commands/tag · high confidence
New test utilities for Git and backend testing
The testutils library now includes a new \git\ module that provides helpers for initializing, opening, and cloning Git repositories using gitoxide, as well as creating gitlinks and managing Git configuration. Additionally, a \TestBackend\ implementation has been added to support strict, in-memory backend testing for unit and integration tests, ensuring that object sharing assumptions are correctly validated. These changes enhance the reliability and isolation of tests that interact with Git repositories and backend storage.
lib/testutils · high confidence
Architecture
CLI commands reorganized into individual files and migrated to async
The command implementations in \cli/src/commands\ have been split from a single large module into individual files (e.g., \abandon.rs\, \absorb.rs\, \arrange.rs\, \commit.rs\, \describe.rs\, \diff.rs\, \diffedit.rs\). All command functions are now asynchronous, and the codebase has been updated to use the \MergedTree\ API for handling file trees and diffs. This change improves code maintainability and prepares the CLI for better concurrency.
cli/src/commands · high confidence
Default index implementation restructured into modular sub-components
The default index implementation has been reorganized into a modular structure under \lib/src/default\_index\, introducing dedicated modules for bit sets, changed-path indexing, composite index management, entry definitions, mutable and readonly segments, and rev-walk traversal. This change provides a more maintainable and extensible foundation for the commit index, enabling features like changed-path tracking and optimized ancestor walks through specialized components like \AncestorsBitSet\ and \RevWalkQueue\.
_lib/src/default\index · high confidence
Git commands are split into dedicated subcommand modules
The monolithic Git command implementation has been reorganized into separate, dedicated source files for each subcommand (clone, colocation, export, fetch, import, init, push, remote, and root). This structural change improves code maintainability and clarity by isolating the logic for each specific Git operation into its own module, while the main \mod.rs\ now acts as a dispatcher that imports and routes to these specialized handlers.
cli/src/commands/git · high confidence
New \`jj-dsl\` crate centralizes parsing for revsets, filesets, and templates
The \jj-dsl\ crate has been introduced to host the parsers and grammar definitions for the project's domain-specific languages. This change consolidates the \FilesetParser\, \TemplateParser\, and \RevsetParser\ along with their respective \.pest\ grammar files and shared utility code into a single, repository-independent module. By isolating syntax parsing, alias expansion, and diagnostics in this new crate, the codebase enables better modularity and supports external tooling, such as editor integrations, that need to parse these languages without requiring a full repository context.
dsl · high confidence
Behavioural changes
3275 commits (75 fixes) modifying lib/src
A change to existing behaviour in lib/src — 3275 commits (75 fixs), 55 files.
lib/src · medium confidence · unverified
CLI build script restructured with Apache 2.0 license and symlinked docs
The CLI crate now includes an Apache 2.0 LICENSE file and a new build.rs script that determines the version string by checking for Nix environment variables, then inspecting .git/HEAD or .jj/repo/op\_heads/heads in a colocated workspace, or falling back to git/jj commands. The build script also creates a docs symlink to ../docs if the local docs directory is missing, ensuring documentation paths are correctly resolved during compilation.
cli · high confidence
Introduce CleanupGuard for reliable resource cleanup on process termination
The CLI now registers a signal handler for SIGINT, SIGTERM, and SIGHUP that ensures all registered cleanup callbacks are executed before the process exits. This prevents resource leaks and ensures that temporary files (such as those used by the built-in pager) are properly removed even if the user interrupts the command, addressing previous issues where cleanup was not guaranteed on abrupt termination.
cli/src · high confidence
Introduce mise-based development environment and CI test monitoring
Developers can now use mise to manage tool versions and run project tasks, replacing previous setup methods. The new .config/mise.toml defines tasks for building, testing, linting, and documentation, standardizing the development workflow. Additionally, .config/nextest.toml configures the test runner to mark tests exceeding 10 seconds as slow, improving visibility into performance regressions during CI and local checks.
.config · high confidence
Introduce protobuf code generation tooling with prost and optional field support
A new \gen-protos\ utility has been added to automate the generation of Rust bindings from \.proto\ files located in \src/protos\. The tool uses the \prost\ crate instead of the previous protobuf implementation and is configured with the \--experimental\_allow\_proto3\_optional\ flag to ensure compatibility with older protoc versions (such as 3.12.4). It processes a defined set of schema files, including \default\_index.proto\, \git\_store.proto\, \local\_working\_copy.proto\, \secure\_config.proto\, \simple\_op\_store.proto\, \simple\_store.proto\, and \simple\_workspace\_store.proto\, outputting the generated code into the \protos\ directory.
lib/gen-protos · high confidence
Operation commands refactored into individual modules with new \`op revert\` and \`op abandon\` capabilities
The \cli/src/commands/operation\ directory has been split into separate files for each subcommand (\abandon\, \diff\, \integrate\, \log\, \restore\, \revert\, \show\), making the codebase more modular. This change introduces \jj op revert\ as a new command to revert individual operations by applying the inverse of the operation, and \jj op abandon\ to discard old operation history and reparent descendants. The existing \jj op undo\ command has been renamed to \jj op revert\ (with \restore\ handling the previous undo-like behavior of restoring to a specific state). All operation commands are now asynchronous, and the \op diff\ command has been enhanced to show changes in remote tags and working copy positions.
cli/src/commands/operation · high confidence
Refactor config commands into submodules and add garbage collection
The \jj config\ command suite has been reorganized into dedicated submodules (\edit\, \gc\, \get\, \list\, \path\, \set\, \unset\) to improve code structure. This change introduces a new \jj config gc\ command that identifies and optionally deletes configuration directories for repositories that no longer exist on disk. Additionally, the \jj config edit\ command now validates the configuration file after every edit session, automatically rolling back to the previous state if the new content is invalid TOML.
cli/src/commands/config · high confidence
Refactored git remote commands into dedicated modules with push URL support
The git remote management commands (add, list, remove, rename, set-url) have been restructured into individual source files within the cli module. This change introduces support for configuring and displaying separate push URLs alongside fetch URLs: the 'add' command now accepts a --push-url flag, the 'list' command displays the push URL when it differs from the fetch URL, and the 'set-url' command allows updating fetch and push URLs independently via --fetch and --push flags. Additionally, 'jj git remote add' now warns users if a new remote's URL duplicates an existing remote's URL to prevent configuration errors.
cli/src/commands/git/remote · high confidence
Restructure and expand the \`jj debug\` command suite
The \jj debug\ command has been reorganized into a modular structure with multiple subcommands, replacing the previous monolithic implementation. This change introduces several new debugging capabilities: \jj debug copy-detection\ to inspect file copy records, \jj debug index\ and \jj debug index-changed-paths\ to view and build the changed-path index, \jj debug init-simple\ to initialize a repository using the proof-of-concept simple backend, \jj debug local-working-copy\ to inspect local working copy state, \jj debug object\ to inspect various repository objects (commits, files, trees, etc.), \jj debug reindex\ to rebuild the commit index, \jj debug revset\ to debug revset parsing and evaluation, \jj debug stacked-table\ to inspect stacked table stats, \jj debug template\ to parse templates, \jj debug tree\ to list tree entries, and \jj debug watchman\ to query Watchman status. The \jj debug working-copy\ command has been renamed to \jj debug local-working-copy\ for clarity, and \jj debug snapshot\ is now deprecated in favor of \jj util snapshot\.
cli/src/commands/debug · high confidence
Revised internal storage schemas for commits, operations, and workspaces
The internal protobuf definitions in \lib/src/protos\ have been updated to support new backend capabilities and structural changes. The \simple\_store\ schema now includes \copy\_id\ on file entries and \conflict\_labels\ on commits to better represent tree conflicts, while the \simple\_op\_store\ schema introduces \RemoteView\ for remote bookmarks/tags, per-workspace Git HEAD tracking, and operation metadata attributes. The \local\_working\_copy\ schema adds \conflict\_labels\ to tree states and deprecates legacy tree ID fields, and the \simple\_workspace\_store\ schema is introduced to persist workspace paths. Additionally, a new \default\_index\ schema defines segment control for the changed-path index, and a \secure\_config\ schema adds metadata for configuration file paths.
lib/src/protos · high confidence
Workspace management commands restructured and enhanced
The workspace subcommands have been refactored into dedicated source files (add, forget, list, remove, rename, root, update\_stale) and made fully asynchronous. \jj workspace add\ now supports creating workspaces in existing empty directories, allows specifying parent revisions and commit messages via \--revision\ and \--message\, and integrates with Git worktrees when colocated. \jj workspace forget\ now warns when attempting to forget unknown workspaces and preserves workspace store paths to support undo operations. \jj workspace list\ now supports custom templates via the \-T\ flag and the \templates.workspace\_list\ setting. \jj workspace remove\ now snapshots uncommitted changes before deleting the workspace directory and its contents from disk, while \jj workspace rename\ allows changing the current workspace's name.
cli/src/commands/workspace · high confidence
Test coverage
Add comprehensive test suite for jj-lib; Add tests for new file management commands; Added test utilities and benchmark data for CLI testing; Expanded test coverage for parallelize, rebase, resolve, and restore commands; Expanded test coverage for tag, templater, undo/redo, util, working copy, and workspaces; New test infrastructure in cli/tests/common; Port CLI tests to TestWorkDir API and gitoxide; Port CLI tests to the TestWorkDir API; Port CLI tests to the TestWorkDir API; Port Git and global option tests to the TestWorkDir API; Port Git and operation tests to gitoxide and TestWorkDir API; Port Git integration tests to gitoxide; Port and update CLI tests to the new TestWorkDir API; Port and update CLI tests to the new TestWorkDir API; Test infrastructure updates and test coverage expansion; Test suite migration and expansion in cli/tests; Test suite updates for identical commits, immutable commits, interdiff, log, and metaedit; Updated CLI test suite for absorb, ACLs, bookmark advancement, aliases, and arrange; Updated CLI test suite for bisect, bookmarks, aliases, and commits.
Dependencies
Initial dependency manifests and lockfile for Jujutsu
The project now includes its first \Cargo.lock\ and \Cargo.toml\ manifests for the Rust workspace (including \jj-cli\, \jj-lib\, \jj-core\, \jj-dsl\, and \testutils\), alongside \pyproject.toml\ and \package.json\ for the documentation site. This establishes the dependency graph for the version control system and its docs, pinning versions for tools like \clap\, \gix\, \ratatui\, \mkdocs-material\, and \astro\.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 67.
Lenses
- Code Health 55
- Architecture 93
- Maturity 80
- Readiness 80
- Security 87
- Domain Modelling 100
- Performance 71
Changes since last survey
- 300 commits — 291 feature/other, 9 fixes
By area
- cli/src — 102 commits
- lib/src — 53 commits
- (root) — 43 commits
- core/src — 36 commits
- cli/tests — 21 commits
- lib/tests — 7 commits
- web/docs — 5 commits
- core/Cargo.toml — 3 commits
- docs/config.md — 3 commits
- docs/style_guide.md — 3 commits
- .config/mise.toml — 2 commits
- .github/workflows — 2 commits
- docs/guides — 2 commits
- docs/paid_contributors.md — 2 commits
- docs/revsets.md — 2 commits
- dsl/src — 2 commits
- .cargo/config-ci.toml — 1 commit
- cli/Cargo.toml — 1 commit
- cli/testing — 1 commit
- core/LICENSE — 1 commit
Notable commits
- fix: bisect: --find-good: fix the docs
- fix: cli: fix styling of "workspace list" output
- fix: config schema: Fix "valid under more than one of the schemas" error
- fix: fix: Replace line-range-arg with line-range-args
- fix: mise: fix codespell tasks on Windows by running them through pwsh
- fix: nix: fix usage of isLinux, isDarwin
- fix: stacked_table: fix get_head_locked to preserve newly saved table after merging parent and child
- fix: templater: fix floor/ceil_char_boundary() TODO
- fix: test_converge: fix flaky op order on timestamp ties
- change: arrange: scroll viewport to keep selection visible
- change: backend: remove abstract gc() method
- change: backend: use associated constants for static type names
- change: bisect: --trust-endpoints
- change: cargo: add package.include value in jj-core
- change: cargo: bump blake2 (0.10.6->0.11.0) and digest (0.10.7->0.11.3)
- change: cargo: bump gix to 0.87.1
- change: cargo: bump gix to v0.88.0
- change: cargo: bump jsonschema
- change: cargo: bump jsonschema
- change: cargo: bump the cargo-dependencies group with 5 updates
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
jj-vcs/jj was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 11 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 394df98927706726e9f372bc787ccd37f9d4682b — the exact code this score is about.
- Scored under rubric-2026.10.5 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-fe8540b5da9b.