About
jj is a Git-compatible version control system that is both simple and powerful. See the installation instructions to get started.
Release highlights
-
jj undois now sequential: invoking it multiple times in sequence repeatedly undoes actions in the operation log. Previously,jj undowould only undo the most recent operation in the operation log. As a result, a newjj redocommand has been added. -
Experimental support for improving query performance over filesets and file queries (like
jj log path/to/file.txt) has been added. This is not enabled by default. To enable this, you must use thejj debug index-changed-pathscommand.
Breaking changes
-
jj evologtemplates now acceptCommitEvolutionEntryas context type. To getCommitproperties, usecommit.<method>(). To customize the default output, settemplates.evologinstead oftemplates.log. -
jj op shownow usestemplates.op_showconfiguration for its default template instead oftemplates.op_log. -
The deprecated config option
git.auto-local-branchhas been removed. Usegit.auto-local-bookmarkinstead. -
The deprecated
Signature.username()template method has been removed. UseSignature.email().local()instead. -
The deprecated
--config-tomlflag has been removed. Use--config=NAME=VALUEor--config-file=PATHinstead. -
jj undocan now undo multiple operations progressively by calling it repeatedly, whereas previously, runningjj undotwice was previously a no-op (it only undid the last change). -
jj git fetchwill now only fetch the refspec patterns configured on remotes when the--bookmarkoption is omitted. Only simple refspec patterns are currently supported, and anything else (like refspecs which rename branches) will be ignored. -
The
conflictlabel used for coloring log graph nodes was renamed toconflicted.
Deprecations
-
The on-disk index format has changed.
jjwill write index files in both old and new formats, so oldjjversions should be able to read these index files. This compatibility layer will be removed in a future release. -
jj op undois deprecated in favor ofjj op revert. (jj undois still available, but with new semantics. See also the breaking changes above.) -
The argument
<operation>ofjj undois deprecated in favor ofjj op revert <operation>. -
The
--whatflag onjj undois deprecated. Consider usingjj op restore --whatinstead.
New features
-
The new command
jj redocan progressively redo operations that were previously undone by multiple calls tojj undo. -
Templates now support
any()andall()methods on lists to check whether any or all elements satisfy a predicate. Example:parents.any(|c| c.mine())returns true if any parent commit is authored by the user. -
Add experimental support for indexing changed paths, which will speed up
jj log PATHquery,jj file annotate, etc. The changed-path index can be enabled byjj debug index-changed-pathscommand. Indexing may take tens of minutes depending on the number of merge commits. The indexing command UI is subject to change. #4674 -
jj config listnow supports-T'json(self) ++ "\n"'serialization output. -
jj file shownow accepts-T/--templateoption to insert file metadata. -
The template language now allows arbitrary whitespace between any operators.
-
The new configuration option
git.colocate=booleancontrols whether or not Git repositories are colocated by default. -
Both
jj git cloneandjj git initnow take a--no-colocateflag to disable colocation (in casegit.colocateis set totrue.) -
jj git remote addandjj git clonenow support--fetch-tagsto control when tags are fetched for all subsequent fetches. -
jj git fetchnow supports--trackedto fetch only tracked bookmarks. -
jj diff --statnow shows the change in size to binary files. -
jj interdiff,jj evolog -p, andjj op log -pnow show diff of commit descriptions. -
jj logandjj op logoutput can now be anonymized with thebuiltin_log_redactedandbuiltin_op_log_redactedtemplates. -
jj git initnow checks for anupstreamremote in addition tooriginwhen setting the repository-leveltrunk()alias. Theupstreamremote takes precedence overoriginif both exist. -
Add the
jj metaeditcommand, which modifies a revision's metadata. This can be used to generate a new change-id, which may help resolve some divergences. It also has options to modify author name, email and timestamp, as well as to modify committer timestamp. -
Filesets now support case-insensitive glob patterns with the
glob-i:,cwd-glob-i:, androot-glob-i:pattern kinds. For example,glob-i:"*.rs"will match bothfile.rsandFILE.RS. -
jj op shownow accepts-T/--templateoption to customize the operation output using template expressions, similar tojj op log. Also added--no-op-diffflag to suppress the operation diff. -
A nearly identical string pattern system as revsets is now supported in the template language, and is exposed as
string.match(pattern).
Fixed bugs
-
jj git clonenow correctly fetches all tags, unless--fetch-tagsis explicitly specified, in which case the specified option will apply for both the initial clone and subsequent fetches. -
Operation and working-copy state files are now synchronized to disk on save. This will mitigate data corruption on system crash. #4423
Packaging changes
- The test suite no longer optionally uses Taplo CLI or jq, and packagers can remove them as dependencies if present.
Contributors
- Austin Seipp (@thoughtpolice)
- Benjamin Tan (@bnjmnt4n)
- Christian Hufnagel (@OvidiusCicero)
- Clément (@drawbu)
- Daniel Luz (@mernen)
- Emily (@emilazy)
- Evan Martin (@evmar)
- Gaëtan Lehmann (@glehmann)
- George Christou (@gechr)
- Graham Christensen (@grahamc)
- Hegui Dai (@Natural-selection1)
- Ian Wrzesinski (@isuffix)
- Ilya Grigoriev (@ilyagr)
- Isaac Corbrey (@icorbrey)
- Ivan Petkov (@ipetkov)
- Joaquín Triñanes (@JoaquinTrinanes)
- Kaiyi Li (@06393993)
- Martin von Zweigbergk (@martinvonz)
- Nigthknight (@nigthknight)
- Nikhil Marathe (@nikhilm)
- Remo Senekowitsch (@senekor)
- Tijs-B (@Tijs-B)
- Yuya Nishihara (@yuja)