Compare commits

..

11 Commits

Author SHA1 Message Date
bd6892d91e chore(jj-lib): upgrade to jj-lib 0.40.0
All checks were successful
Publish Docker Images / coverage-and-sonar (push) Successful in 16m32s
2026-05-03 19:56:27 +02:00
07f5b3e91e docs(contributing): clarifying and expanding AI requirements
Introduce stricter requirements regarding AI-powered contributions, as
inspired by the Linux Kernel's guidelines.
2026-04-23 20:15:56 +02:00
9a6b94276b chore(deps): RUSTSEC-2026-0097 mitigation
All checks were successful
Publish Docker Images / coverage-and-sonar (push) Successful in 16m23s
2026-04-22 01:18:12 +02:00
c5814ab480 feat(cli): add jj-lib version to version output 2026-04-22 01:18:12 +02:00
1bab78cb20 feat: set message for multiple revsets
Allows to set the revision message of multiple revisions by passing
them as arguments. This only supports simple revisions, such as `@`,
`@-`, `xs`, and so on. Comple revisions such as `@..@-` are not
supported.

Fixes: #5
2026-04-22 01:18:12 +02:00
e965a728a1 refactor(prompter): simplify commit type selection 2026-04-22 01:18:12 +02:00
95e6250a60 fix(scope): no new string allocation to count characters 2026-04-22 01:18:12 +02:00
518d2916b9 feat(errors): preserve jj-emitted errors when loading config 2026-04-22 01:18:12 +02:00
a88f839798 refactor(BreakingChange): rename method ignore to is_absent
Method `ignore` did not carry its meaning well by the way it is named.
This commit renames it to `is_absent` to clearly state this method
returns whether we have a breaking change.
2026-04-22 01:18:12 +02:00
51cf5bae4e refactor(workflow): remove unnecessary async declarations 2026-04-22 01:18:12 +02:00
825127dbdb refactor(nix): simplify package declaration 2026-04-22 01:18:12 +02:00
8 changed files with 449 additions and 199 deletions

View File

@@ -47,7 +47,8 @@ accepted, provided you
assistance); assistance);
3. are prepared to discuss it directly with human reviewers. 3. are prepared to discuss it directly with human reviewers.
**All AI usage requires explicit disclosure**, except in these cases: **All AI usage requires explicit disclosure** (see Attribution section
for commit message requirements), except in these cases:
- Trivial tab autocompletion, but only for completion that you have - Trivial tab autocompletion, but only for completion that you have
already conceptualized in your mind. already conceptualized in your mind.
- Asking the AI about knowledge that is not directly related to your - Asking the AI about knowledge that is not directly related to your
@@ -62,6 +63,40 @@ the AI **MUST** be included in the repository. AI **MAY** generate the
initial output, but the final specification **MUST** be entirely initial output, but the final specification **MUST** be entirely
reviewed and understood by a human. reviewed and understood by a human.
### Attribution
<!-- Inspired by the Linux Kernel AI Coding Assistants guidelines -->
When using AI assistance in contributions:
- **AI cannot be a commit author.** All commits must be authored by a
human contributor.
- **AI cannot sign off commits.** Only humans can legally certify
commits by adding a `Signed-off-by:` tag. AI tools MUST NOT add
`Signed-off-by` tags.
- **The human author bears full responsibility.** The human
contributor is responsible for:
- Reviewing all AI-generated or AI-assisted code
- Ensuring compliance with licensing requirements
- Taking full responsibility for the contribution
- **AI-assisted commits must include an `Assisted-by:` footer**. The
format is:
```
Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]
```
Where:
- `AGENT_NAME` is the name of the AI tool or framework
- `MODEL_VERSION` is the specific model version used
- `[TOOL1] [TOOL2]` are optional specialized analysis tools used
(not basic tools like git, cargo, Nix, editors)
Example:
```
Assisted-by: Claude:claude-3-sonnet
```
--- ---
## Guidelines for AI Agents ## Guidelines for AI Agents

View File

@@ -73,7 +73,44 @@ adhere to the following requirements:
(bug reports, feature requests, pull request descriptions, (bug reports, feature requests, pull request descriptions,
responding to humans, ...). responding to humans, ...).
For more info, please refer to the [AGENTS.md](AGENTS.md) file. ### Attribution
When using AI assistance in contributions:
- **AI cannot be a commit author.** All commits must be authored by a
human contributor.
- **AI cannot sign off commits.** Only humans can legally certify
commits by adding a `Signed-off-by:` tag. AI tools MUST NOT add
`Signed-off-by` tags.
- **The human author bears full responsibility.** The human
contributor is responsible for:
- Reviewing all AI-generated or AI-assisted code
- Ensuring compliance with licensing requirements
- Taking full responsibility for the contribution
- **AI-assisted commits must include an `Assisted-by:` footer**. The
format is:
```
Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]
```
Where:
- `AGENT_NAME` is the name of the AI tool or framework
- `MODEL_VERSION` is the specific model version used
- `[TOOL1] [TOOL2]` are optional specialized analysis tools used
(not basic tools like git, cargo, Nix, editors)
Example:
```
Assisted-by: Claude:claude-3-sonnet
```
See the [AGENTS.md](AGENTS.md#attribution) file for the full format
specification.
For more info, please refer to the [AGENTS.md](AGENTS.md)
file.
## Code of Conduct ## Code of Conduct

494
Cargo.lock generated
View File

@@ -62,7 +62,7 @@ version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
dependencies = [ dependencies = [
"windows-sys 0.61.2", "windows-sys",
] ]
[[package]] [[package]]
@@ -73,7 +73,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [ dependencies = [
"anstyle", "anstyle",
"once_cell_polyfill", "once_cell_polyfill",
"windows-sys 0.61.2", "windows-sys",
] ]
[[package]] [[package]]
@@ -543,7 +543,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [ dependencies = [
"libc", "libc",
"windows-sys 0.61.2", "windows-sys",
] ]
[[package]] [[package]]
@@ -553,7 +553,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de48cc4d1c1d97a20fd819def54b890cadde72ed3ad0c614822a0a433361be96" checksum = "de48cc4d1c1d97a20fd819def54b890cadde72ed3ad0c614822a0a433361be96"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"windows-sys 0.61.2", "windows-sys",
] ]
[[package]] [[package]]
@@ -753,22 +753,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6a949b7fcc81df22526032dcddb006e78c8575e47b0e7ba57d9960570a57bc4" checksum = "f6a949b7fcc81df22526032dcddb006e78c8575e47b0e7ba57d9960570a57bc4"
dependencies = [ dependencies = [
"unicase", "unicase",
"winnow", "winnow 0.7.15",
] ]
[[package]] [[package]]
name = "gix" name = "gix"
version = "0.80.0" version = "0.81.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5aa56fdbfe98258af2759818ddc3175cc581112660e74c3fd55669836d29a994" checksum = "0473c64d9ccbcfb9953a133b47c8b9a335b87ac6c52b983ee4b03d49000b0f3f"
dependencies = [ dependencies = [
"gix-actor", "gix-actor",
"gix-archive",
"gix-attributes", "gix-attributes",
"gix-blame",
"gix-command", "gix-command",
"gix-commitgraph", "gix-commitgraph",
"gix-config", "gix-config",
"gix-date", "gix-date",
"gix-diff", "gix-diff",
"gix-dir",
"gix-discover", "gix-discover",
"gix-error", "gix-error",
"gix-features", "gix-features",
@@ -780,6 +783,8 @@ dependencies = [
"gix-ignore", "gix-ignore",
"gix-index", "gix-index",
"gix-lock", "gix-lock",
"gix-merge",
"gix-negotiate",
"gix-object", "gix-object",
"gix-odb", "gix-odb",
"gix-pack", "gix-pack",
@@ -792,6 +797,7 @@ dependencies = [
"gix-revwalk", "gix-revwalk",
"gix-sec", "gix-sec",
"gix-shallow", "gix-shallow",
"gix-status",
"gix-submodule", "gix-submodule",
"gix-tempfile", "gix-tempfile",
"gix-trace", "gix-trace",
@@ -800,6 +806,8 @@ dependencies = [
"gix-utils", "gix-utils",
"gix-validate", "gix-validate",
"gix-worktree", "gix-worktree",
"gix-worktree-state",
"gix-worktree-stream",
"nonempty", "nonempty",
"smallvec", "smallvec",
"thiserror", "thiserror",
@@ -814,7 +822,20 @@ dependencies = [
"bstr", "bstr",
"gix-date", "gix-date",
"gix-error", "gix-error",
"winnow", "winnow 0.7.15",
]
[[package]]
name = "gix-archive"
version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "651c99be11aac9b303483193ae50b45eb6e094da4f5ed797019b03948f51aad6"
dependencies = [
"bstr",
"gix-date",
"gix-error",
"gix-object",
"gix-worktree-stream",
] ]
[[package]] [[package]]
@@ -843,6 +864,26 @@ dependencies = [
"gix-error", "gix-error",
] ]
[[package]]
name = "gix-blame"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c77aaf9f7348f4da3ebfbfbbc35fa0d07155d98377856198dde6f695fd648705"
dependencies = [
"gix-commitgraph",
"gix-date",
"gix-diff",
"gix-error",
"gix-hash",
"gix-object",
"gix-revwalk",
"gix-trace",
"gix-traverse",
"gix-worktree",
"smallvec",
"thiserror",
]
[[package]] [[package]]
name = "gix-chunk" name = "gix-chunk"
version = "0.7.0" version = "0.7.0"
@@ -867,9 +908,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-commitgraph" name = "gix-commitgraph"
version = "0.34.0" version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aea2fcfa6bc7329cd094696ba76682b89bdb61cafc848d91b34abba1c1d7e040" checksum = "3196655fd1443f3c58a48c114aa480be3e4e87b393d7292daaa0d543862eb445"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-chunk", "gix-chunk",
@@ -881,9 +922,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-config" name = "gix-config"
version = "0.53.0" version = "0.54.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c24b190bd42b55724368c28ae750840b48e2038b9b5281202de6fca4ec1fce1" checksum = "08939b4c4ed7a663d0e64be9e1e9bdf23a1fb4fcee1febdf449f12229542e50d"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-config-value", "gix-config-value",
@@ -896,7 +937,7 @@ dependencies = [
"smallvec", "smallvec",
"thiserror", "thiserror",
"unicode-bom", "unicode-bom",
"winnow", "winnow 0.7.15",
] ]
[[package]] [[package]]
@@ -914,9 +955,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-date" name = "gix-date"
version = "0.15.0" version = "0.15.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c2f2155782090fd947c2f7904166b9f3c3da0d91358adb011f753ea3a55c0ff" checksum = "b94cdae4eb4b0f4136e3d9b3aa2d2cd03cfb5bb9b636b31263aea2df86d41543"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-error", "gix-error",
@@ -927,9 +968,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-diff" name = "gix-diff"
version = "0.60.0" version = "0.61.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60592771b104eda4e537c311e8239daef0df651d61e0e21855f7e6166416ff12" checksum = "88f3b3475e5d3877d7c30c40827cc2441936ce890efc226e5ba4afe3a7ae33f0"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-command", "gix-command",
@@ -942,15 +983,36 @@ dependencies = [
"gix-trace", "gix-trace",
"gix-traverse", "gix-traverse",
"gix-worktree", "gix-worktree",
"imara-diff", "imara-diff 0.1.8",
"imara-diff 0.2.0",
"thiserror",
]
[[package]]
name = "gix-dir"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5da4604a360988f0ba8efe6f90093ca5a844f4a7f8e1a3dcda501ec44e600ea9"
dependencies = [
"bstr",
"gix-discover",
"gix-fs",
"gix-ignore",
"gix-index",
"gix-object",
"gix-path",
"gix-pathspec",
"gix-trace",
"gix-utils",
"gix-worktree",
"thiserror", "thiserror",
] ]
[[package]] [[package]]
name = "gix-discover" name = "gix-discover"
version = "0.48.0" version = "0.49.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "810764b92e8cb95e4d91b7adfc5a14666434fd32ace02900dfb66aae71f845df" checksum = "c65bd3330fe0cb9d40d875bf862fd5e8ad6fa4164ddbc4842fbeb889c3f0b2c6"
dependencies = [ dependencies = [
"bstr", "bstr",
"dunce", "dunce",
@@ -963,19 +1025,20 @@ dependencies = [
[[package]] [[package]]
name = "gix-error" name = "gix-error"
version = "0.2.0" version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2dfe8025209bf2a72d97a6f2dff105b93e5ebcf131ffa3d3f1728ce4ac3767b" checksum = "e207b971746ab724fccdfced2e4e19e854744611904a0195d3aa8fda8a110613"
dependencies = [ dependencies = [
"bstr", "bstr",
] ]
[[package]] [[package]]
name = "gix-features" name = "gix-features"
version = "0.46.1" version = "0.46.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a83a5fe8927de3bb02b0cfb87165dbfb49f04d4c297767443f2e1011ecc15bdd" checksum = "752493cd4b1d5eaaa0138a7493f65c96863fefa990fc021e0e519579e389ab20"
dependencies = [ dependencies = [
"bytes",
"crc32fast", "crc32fast",
"crossbeam-channel", "crossbeam-channel",
"gix-path", "gix-path",
@@ -992,9 +1055,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-filter" name = "gix-filter"
version = "0.27.0" version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7eda328750accaac05ce7637298fd7d6ba0d5d7bdf49c21f899d0b97e3df822d" checksum = "d37598282a6566da6fb52667570c7fe0aedcb122ac886724a9e62a2180523e35"
dependencies = [ dependencies = [
"bstr", "bstr",
"encoding_rs", "encoding_rs",
@@ -1013,9 +1076,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-fs" name = "gix-fs"
version = "0.19.1" version = "0.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de4bd0d8e6c6ef03485205f8eecc0359042a866d26dba569075db1ebcc005970" checksum = "a964b4aec683eb0bacb87533defa80805bb4768056371a47ab38b00a2d377b72"
dependencies = [ dependencies = [
"bstr", "bstr",
"fastrand", "fastrand",
@@ -1039,9 +1102,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-hash" name = "gix-hash"
version = "0.22.1" version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8ced05d2d7b13bff08b2f7eb4e47cfeaf00b974c2ddce08377c4fe1f706b3eb" checksum = "0fb896a02d9ab96fa518475a5f30ad3952010f801a8de5840f633f4a6b985dfb"
dependencies = [ dependencies = [
"faster-hex", "faster-hex",
"gix-features", "gix-features",
@@ -1051,9 +1114,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-hashtable" name = "gix-hashtable"
version = "0.12.0" version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52f1eecdd006390cbed81f105417dbf82a6fe40842022006550f2e32484101da" checksum = "2664216fc5e89b51e756a4a3ac676315602ce2dac07acf1da959a22038d69b33"
dependencies = [ dependencies = [
"gix-hash", "gix-hash",
"hashbrown 0.16.1", "hashbrown 0.16.1",
@@ -1062,9 +1125,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-ignore" name = "gix-ignore"
version = "0.19.0" version = "0.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8953d87c13267e296d547f0fc7eaa8aa8fa5b2a9a34ab1cd5857f25240c7d299" checksum = "09f915dcf6911e3027537166d34e13f0fe101ed12225178d2ae29cd1272cff26"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-glob", "gix-glob",
@@ -1075,9 +1138,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-index" name = "gix-index"
version = "0.48.0" version = "0.49.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13b28482b86662c8b78160e0750b097a35fd61185803a960681351b3a07de07e" checksum = "1bae54ab14e4e74d5dda60b82ea7afad7c8eb3be68283d6d5f29bd2e6d47fff7"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"bstr", "bstr",
@@ -1113,10 +1176,50 @@ dependencies = [
] ]
[[package]] [[package]]
name = "gix-object" name = "gix-merge"
version = "0.57.0" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "013eae8e072c6155191ac266950dfbc8d162408642571b32e2c6b3e4b03740fb" checksum = "f4606747466512d22c2dffc019142e1941238f543987ea51353c938cca80c500"
dependencies = [
"bstr",
"gix-command",
"gix-diff",
"gix-filter",
"gix-fs",
"gix-hash",
"gix-index",
"gix-object",
"gix-path",
"gix-quote",
"gix-revision",
"gix-revwalk",
"gix-tempfile",
"gix-trace",
"gix-worktree",
"imara-diff 0.1.8",
"nonempty",
"thiserror",
]
[[package]]
name = "gix-negotiate"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ea064c7595eea08fdd01c70748af747d9acc40f727b61f4c8a2145a5c5fc28c"
dependencies = [
"bitflags",
"gix-commitgraph",
"gix-date",
"gix-hash",
"gix-object",
"gix-revwalk",
]
[[package]]
name = "gix-object"
version = "0.58.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cafb802bb688a7c1e69ef965612ff5ff859f046bfb616377e4a0ba4c01e43d47"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-actor", "gix-actor",
@@ -1130,14 +1233,14 @@ dependencies = [
"itoa", "itoa",
"smallvec", "smallvec",
"thiserror", "thiserror",
"winnow", "winnow 0.7.15",
] ]
[[package]] [[package]]
name = "gix-odb" name = "gix-odb"
version = "0.77.0" version = "0.78.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8901a182923799e8857ac01bff6d7c6fecea999abd79a86dab638aadbb843f3" checksum = "24833ae9323b4f7079575fb9f961cf9c414b0afbec428a536ab8e7dd93bc002b"
dependencies = [ dependencies = [
"arc-swap", "arc-swap",
"gix-features", "gix-features",
@@ -1155,9 +1258,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-pack" name = "gix-pack"
version = "0.67.0" version = "0.68.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "194a9f96f4058359d6874123f160e5b2044974829a29f3a71bb9c9218d1916c3" checksum = "e3484119cd19859d7d7639413c27e192478fa354d3f4ff5f7e3c041e8040f0f4"
dependencies = [ dependencies = [
"clru", "clru",
"gix-chunk", "gix-chunk",
@@ -1175,9 +1278,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-packetline" name = "gix-packetline"
version = "0.21.1" version = "0.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25429ee1ef792d9b653ee5de09bb525489fc8e6908334cfd5d5824269f0b7073" checksum = "362246df440ee691699f0664cbf7006a6ece477db6734222be95e4198e5656e6"
dependencies = [ dependencies = [
"bstr", "bstr",
"faster-hex", "faster-hex",
@@ -1187,9 +1290,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-path" name = "gix-path"
version = "0.11.1" version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7163b1633d35846a52ef8093f390cec240e2d55da99b60151883035e5169cd85" checksum = "c8fd1fe596dc393b538e1d5492c5585971a9311475b3255f7b889023df208476"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-trace", "gix-trace",
@@ -1199,9 +1302,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-pathspec" name = "gix-pathspec"
version = "0.16.0" version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40e7636782b35bb1d3ade19ea7387278e96fd49f6963ab41bfca81cef4b61b20" checksum = "f89611f13544ca5ebeb68a502673814ef57200df60c24a61c2ce7b96f612f08b"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"bstr", "bstr",
@@ -1214,9 +1317,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-protocol" name = "gix-protocol"
version = "0.58.0" version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c64ec7b04c57df6e97a2ac4738a4a09897b88febd6ec4bd2c5d3ff3ad3849df" checksum = "4f38666350736b5877c79f57ddae02bde07a4ce186d889adc391e831cddcbe76"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-date", "gix-date",
@@ -1229,7 +1332,7 @@ dependencies = [
"maybe-async", "maybe-async",
"nonempty", "nonempty",
"thiserror", "thiserror",
"winnow", "winnow 0.7.15",
] ]
[[package]] [[package]]
@@ -1245,9 +1348,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-ref" name = "gix-ref"
version = "0.60.0" version = "0.61.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cc7b230945f02d706a49bcf823b671785ecd9e88e713b8bd2ca5db104c97add" checksum = "c2159978abb99b7027c8579d15211e262ef0ef2594d5cecb3334fbcbdfe2997c"
dependencies = [ dependencies = [
"gix-actor", "gix-actor",
"gix-features", "gix-features",
@@ -1261,14 +1364,14 @@ dependencies = [
"gix-validate", "gix-validate",
"memmap2", "memmap2",
"thiserror", "thiserror",
"winnow", "winnow 0.7.15",
] ]
[[package]] [[package]]
name = "gix-refspec" name = "gix-refspec"
version = "0.38.0" version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb3dc194cdc1176fc20f39f233d0d516f83df843ea14a9eb758a2690f3e38d1e" checksum = "dc806ee13f437428f8a1ba4c72ecfaa3f20e14f5f0d4c2bc17d0b33e794aa6ac"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-error", "gix-error",
@@ -1282,10 +1385,11 @@ dependencies = [
[[package]] [[package]]
name = "gix-revision" name = "gix-revision"
version = "0.42.0" version = "0.43.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df9e31cd402edae08c3fdb67917b9fb75b0c9c9bd2fbed0c2dd9c0847039c556" checksum = "7c08f1ec5d1e6a524f8ba291c41f0ccaef64e48ed0e8cf790b3461cae45f6d3d"
dependencies = [ dependencies = [
"bitflags",
"bstr", "bstr",
"gix-commitgraph", "gix-commitgraph",
"gix-date", "gix-date",
@@ -1293,14 +1397,15 @@ dependencies = [
"gix-hash", "gix-hash",
"gix-object", "gix-object",
"gix-revwalk", "gix-revwalk",
"gix-trace",
"nonempty", "nonempty",
] ]
[[package]] [[package]]
name = "gix-revwalk" name = "gix-revwalk"
version = "0.28.0" version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "573f6e471d76c0796f0b8ed5a431521ea5d121a7860121a2a9703e9434ab1d52" checksum = "0e4b2b87772b21ca449249e86d32febadba5cba32b0fcce804ab9cefc6f2111c"
dependencies = [ dependencies = [
"gix-commitgraph", "gix-commitgraph",
"gix-date", "gix-date",
@@ -1314,21 +1419,21 @@ dependencies = [
[[package]] [[package]]
name = "gix-sec" name = "gix-sec"
version = "0.13.1" version = "0.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e014df75f3d7f5c98b18b45c202422da6236a1c0c0a50997c3f41e601f3ad511" checksum = "283f4a746c9bde8550be63e6f961ff4651f412ca12666e8f5615f39464960ab9"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"gix-path", "gix-path",
"libc", "libc",
"windows-sys 0.61.2", "windows-sys",
] ]
[[package]] [[package]]
name = "gix-shallow" name = "gix-shallow"
version = "0.9.0" version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ee51037c8a27ddb1c7a6d6db2553d01e501d5b1dae7dc65e41905a70960e658" checksum = "cbf60711c9083b2364b3fac8a352444af76b17201f3682fdebe74fa66d89a772"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-hash", "gix-hash",
@@ -1338,10 +1443,33 @@ dependencies = [
] ]
[[package]] [[package]]
name = "gix-submodule" name = "gix-status"
version = "0.27.0" version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6cba2022599491d620fbc77b3729dba0120862ce9b4af6e3c47d19a9f2a5d884" checksum = "23d6c598e3fdbc352fba1c5ba7e709e69402fafbc44d9295edad2e3c4738996b"
dependencies = [
"bstr",
"filetime",
"gix-diff",
"gix-dir",
"gix-features",
"gix-filter",
"gix-fs",
"gix-hash",
"gix-index",
"gix-object",
"gix-path",
"gix-pathspec",
"gix-worktree",
"portable-atomic",
"thiserror",
]
[[package]]
name = "gix-submodule"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ce5c3929c5e6821f651d35e8420f72fea3cfafe9fc1e928a61e718b462c72a5"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-config", "gix-config",
@@ -1367,15 +1495,15 @@ dependencies = [
[[package]] [[package]]
name = "gix-trace" name = "gix-trace"
version = "0.1.18" version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f69a13643b8437d4ca6845e08143e847a36ca82903eed13303475d0ae8b162e0" checksum = "6f23569e55f2ffaf958617353b9734a7d52a7c19c439eeaa5e3efc217fd2270e"
[[package]] [[package]]
name = "gix-transport" name = "gix-transport"
version = "0.55.0" version = "0.55.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4d72f5094b9f851e348f2cbb840d026ffd8119fc28bc2bca1387eecd171c815" checksum = "a521e39c6235ce63ed6c001e2dd79818c830b82c3b7b59247ee7b229c39ec9bb"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-command", "gix-command",
@@ -1389,9 +1517,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-traverse" name = "gix-traverse"
version = "0.54.0" version = "0.55.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c99b3cf9dc87c13f1404e7b0e8c5e4bff4975d6f788831c02d6c006f3c76b4a0" checksum = "963dc2afcdb611092aa587c3f9365e749ac0a0892ff27662dbc75f26c953fbec"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"gix-commitgraph", "gix-commitgraph",
@@ -1422,24 +1550,25 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "befcdbdfb1238d2854591f760a48711bed85e72d80a10e8f2f93f656746ef7c5" checksum = "befcdbdfb1238d2854591f760a48711bed85e72d80a10e8f2f93f656746ef7c5"
dependencies = [ dependencies = [
"bstr",
"fastrand", "fastrand",
"unicode-normalization", "unicode-normalization",
] ]
[[package]] [[package]]
name = "gix-validate" name = "gix-validate"
version = "0.11.0" version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ec1eff98d91941f47766367cba1be746bab662bad761d9891ae6f7882f7840b" checksum = "e26ac2602b43eadfdca0560b81d3341944162a3c9f64ccdeef8fc501ad80dad5"
dependencies = [ dependencies = [
"bstr", "bstr",
] ]
[[package]] [[package]]
name = "gix-worktree" name = "gix-worktree"
version = "0.49.0" version = "0.50.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "005627fc149315f39473e3e94a50058dd5d345c490a23723f67f32ee9c505232" checksum = "e6bd5830cbc43c9c00918b826467d2afad685b195cb82329cde2b2d116d2c578"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-attributes", "gix-attributes",
@@ -1453,6 +1582,42 @@ dependencies = [
"gix-validate", "gix-validate",
] ]
[[package]]
name = "gix-worktree-state"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "644a1681f96e1be43c2a8384337d9d220e7624f50db54beda70997052aebf707"
dependencies = [
"bstr",
"gix-features",
"gix-filter",
"gix-fs",
"gix-index",
"gix-object",
"gix-path",
"gix-worktree",
"io-close",
"thiserror",
]
[[package]]
name = "gix-worktree-stream"
version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24e3fb70a1f650a5cec7d5b8d10d6d6fe86daf3cf15bde08ba0c70988a2932c3"
dependencies = [
"gix-attributes",
"gix-error",
"gix-features",
"gix-filter",
"gix-fs",
"gix-hash",
"gix-object",
"gix-path",
"gix-traverse",
"parking_lot",
]
[[package]] [[package]]
name = "globset" name = "globset"
version = "0.4.18" version = "0.4.18"
@@ -1686,6 +1851,16 @@ dependencies = [
"hashbrown 0.15.5", "hashbrown 0.15.5",
] ]
[[package]]
name = "imara-diff"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f01d462f766df78ab820dd06f5eb700233c51f0f4c2e846520eaf4ba6aa5c5c"
dependencies = [
"hashbrown 0.15.5",
"memchr",
]
[[package]] [[package]]
name = "indexmap" name = "indexmap"
version = "2.13.0" version = "2.13.0"
@@ -1723,6 +1898,16 @@ dependencies = [
"logos", "logos",
] ]
[[package]]
name = "io-close"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9cadcf447f06744f8ce713d2d6239bb5bde2c357a452397a9ed90c625da390bc"
dependencies = [
"libc",
"winapi",
]
[[package]] [[package]]
name = "is_terminal_polyfill" name = "is_terminal_polyfill"
version = "1.70.2" version = "1.70.2"
@@ -1756,7 +1941,7 @@ dependencies = [
"portable-atomic", "portable-atomic",
"portable-atomic-util", "portable-atomic-util",
"serde_core", "serde_core",
"windows-sys 0.61.2", "windows-sys",
] ]
[[package]] [[package]]
@@ -1809,9 +1994,9 @@ dependencies = [
[[package]] [[package]]
name = "jj-lib" name = "jj-lib"
version = "0.39.0" version = "0.40.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f70302ae78e8dbb6aad7df472b3cdfb034649155cf8b7329240b6e79c38d659" checksum = "aa8eadc56d459f48a58adcbdb66309b9d981f16816cc388cf91f27fd4fc4602a"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"blake2", "blake2",
@@ -1857,9 +2042,9 @@ dependencies = [
[[package]] [[package]]
name = "jj-lib-proc-macros" name = "jj-lib-proc-macros"
version = "0.39.0" version = "0.40.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8139c6755c9a8666ea01a75b4d817df838c8ceacd607f8e553b5cb4e9327836" checksum = "e408043812a3da5b593e791e57e06ddaeffa041ee34e99b4bea4df84c734e8e5"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -2047,7 +2232,7 @@ dependencies = [
"libc", "libc",
"log", "log",
"wasi", "wasi",
"windows-sys 0.61.2", "windows-sys",
] ]
[[package]] [[package]]
@@ -2304,9 +2489,9 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
[[package]] [[package]]
name = "rand" name = "rand"
version = "0.10.0" version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8" checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207"
dependencies = [ dependencies = [
"chacha20", "chacha20",
"getrandom", "getrandom",
@@ -2441,7 +2626,7 @@ dependencies = [
"errno", "errno",
"libc", "libc",
"linux-raw-sys", "linux-raw-sys",
"windows-sys 0.61.2", "windows-sys",
] ]
[[package]] [[package]]
@@ -2520,9 +2705,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_spanned" name = "serde_spanned"
version = "1.0.4" version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26"
dependencies = [ dependencies = [
"serde_core", "serde_core",
] ]
@@ -2679,7 +2864,7 @@ dependencies = [
"getrandom", "getrandom",
"once_cell", "once_cell",
"rustix", "rustix",
"windows-sys 0.61.2", "windows-sys",
] ]
[[package]] [[package]]
@@ -2784,10 +2969,10 @@ dependencies = [
"indexmap", "indexmap",
"serde_core", "serde_core",
"serde_spanned", "serde_spanned",
"toml_datetime", "toml_datetime 0.7.5+spec-1.1.0",
"toml_parser", "toml_parser",
"toml_writer", "toml_writer",
"winnow", "winnow 0.7.15",
] ]
[[package]] [[package]]
@@ -2800,34 +2985,43 @@ dependencies = [
] ]
[[package]] [[package]]
name = "toml_edit" name = "toml_datetime"
version = "0.24.1+spec-1.1.0" version = "1.1.1+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01f2eadbbc6b377a847be05f60791ef1058d9f696ecb51d2c07fe911d8569d8e" checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7"
dependencies = [
"serde_core",
]
[[package]]
name = "toml_edit"
version = "0.25.11+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b"
dependencies = [ dependencies = [
"indexmap", "indexmap",
"serde_core", "serde_core",
"serde_spanned", "serde_spanned",
"toml_datetime", "toml_datetime 1.1.1+spec-1.1.0",
"toml_parser", "toml_parser",
"toml_writer", "toml_writer",
"winnow", "winnow 1.0.2",
] ]
[[package]] [[package]]
name = "toml_parser" name = "toml_parser"
version = "1.0.9+spec-1.1.0" version = "1.1.2+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526"
dependencies = [ dependencies = [
"winnow", "winnow 1.0.2",
] ]
[[package]] [[package]]
name = "toml_writer" name = "toml_writer"
version = "1.0.6+spec-1.1.0" version = "1.1.1+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db"
[[package]] [[package]]
name = "tracing" name = "tracing"
@@ -3106,7 +3300,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [ dependencies = [
"windows-sys 0.61.2", "windows-sys",
] ]
[[package]] [[package]]
@@ -3174,15 +3368,6 @@ dependencies = [
"windows-link", "windows-link",
] ]
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]
[[package]] [[package]]
name = "windows-sys" name = "windows-sys"
version = "0.61.2" version = "0.61.2"
@@ -3192,70 +3377,6 @@ dependencies = [
"windows-link", "windows-link",
] ]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]] [[package]]
name = "winnow" name = "winnow"
version = "0.7.15" version = "0.7.15"
@@ -3266,13 +3387,22 @@ dependencies = [
] ]
[[package]] [[package]]
name = "winreg" name = "winnow"
version = "0.55.0" version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97" checksum = "2ee1708bef14716a11bae175f579062d4554d95be2c6829f518df847b7b3fdd0"
dependencies = [
"memchr",
]
[[package]]
name = "winreg"
version = "0.56.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d6f32a0ff4a9f6f01231eb2059cc85479330739333e0e58cadf03b6af2cca10"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"windows-sys 0.59.0", "windows-sys",
] ]
[[package]] [[package]]

View File

@@ -27,7 +27,7 @@ etcetera = "0.11.0"
clap = { version = "4.5.57", features = ["derive"] } clap = { version = "4.5.57", features = ["derive"] }
git-conventional = "0.12.9" git-conventional = "0.12.9"
inquire = { version = "0.9.2", features = ["editor"] } inquire = { version = "0.9.2", features = ["editor"] }
jj-lib = "0.39.0" jj-lib = "0.40.0"
lazy-regex = { version = "3.5.1", features = ["lite"] } lazy-regex = { version = "3.5.1", features = ["lite"] }
thiserror = "2.0.18" thiserror = "2.0.18"
tokio = { version = "1.49.0", features = ["macros", "rt-multi-thread"] } tokio = { version = "1.49.0", features = ["macros", "rt-multi-thread"] }

View File

@@ -24,6 +24,16 @@ jj-cz
The tool detects whether you're in a Jujutsu repository, guides you The tool detects whether you're in a Jujutsu repository, guides you
through the commit message, and applies it to your current change. through the commit message, and applies it to your current change.
You can also set the revision message of a few revisions at once, or
target a single revision other than the current one.
```sh
jj-cz @- xs develop
```
No explicit revision is simply the equivalent of `jj-cz @`, like
`jj desc`.
## Requirements ## Requirements
- A Jujutsu repository - A Jujutsu repository
@@ -41,8 +51,44 @@ what `jj-cz` alone would be good for without `jj`.
| 130 | Interrupted | | 130 | Interrupted |
## Installation ## Installation
### From crates.io
Simply run the following command:
You can install jj-cz with Cargo by building it from source. ```
cargo install jj-cz
```
Done! `jj-cz` is now available!
### With Nix Flakes
Notice how theres a `flake.nix` file? This means you can run the
project using this repository as one of your flakes inputs. In fact,
thats how I install it in my own NixOS configuration! Add this
repository to your configuration:
```nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
jj-cz = {
url = "git+https://labs.phundrak.com/phundrak/jj-cz";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}
```
And tadah! you can now install
`inputs.jj-cz.packages.${pkgs.stdenv.hostPlatform.system}.default`
among your other packages. Take a look at my
[`jujutsu.nix`](https://labs.phundrak.com/phundrak/nix-config/src/branch/main/users/modules/dev/vcs/jujutsu.nix)
module if you need some inspiration.
### From source
You can also install `jj-cz` with Cargo by building it from source.
Just make sure Rust is available on your machine (duh!).
```sh ```sh
cargo install --path . cargo install --path .

View File

@@ -2,7 +2,12 @@ use cargo_lock::Lockfile;
fn main() { fn main() {
let lockfile = Lockfile::load("Cargo.lock").expect("Cargo.lock not found"); let lockfile = Lockfile::load("Cargo.lock").expect("Cargo.lock not found");
let version = lockfile.packages.iter().find(|p| p.name.as_str() == "jj-lib").map(|p| p.version.to_string()).unwrap_or_else(|| "unknown".to_string()); let version = lockfile
.packages
.iter()
.find(|p| p.name.as_str() == "jj-lib")
.map(|p| p.version.to_string())
.unwrap_or_else(|| "unknown".to_string());
println!("cargo:rustc-env=JJ_LIB_VERSION={version}"); println!("cargo:rustc-env=JJ_LIB_VERSION={version}");
println!("cargo:rerun-if-changed=Cargo.lock"); println!("cargo:rerun-if-changed=Cargo.lock");
} }

View File

@@ -16,9 +16,6 @@
meta = { meta = {
inherit (cargoToml.package) description homepage; inherit (cargoToml.package) description homepage;
}; };
postBuild = ''
${pkgs.upx}/bin/upx target/*/release/${name}
'';
}; };
nativeBuild = nativeBuild =
nativeRustPlatform.buildRustPackage buildArgs nativeRustPlatform.buildRustPackage buildArgs

View File

@@ -239,7 +239,8 @@ impl JjExecutor for JjLib {
context: format!("{e:?}"), context: format!("{e:?}"),
})?; })?;
let new_repo = tx.commit("jj-cz: update commit description") let new_repo = tx
.commit("jj-cz: update commit description")
.await .await
.map_err(|e| Error::JjOperation { .map_err(|e| Error::JjOperation {
context: e.to_string(), context: e.to_string(),
@@ -403,16 +404,16 @@ mod tests {
#[tokio::test] #[tokio::test]
async fn describe_fails_outside_repo() { async fn describe_fails_outside_repo() {
let temp_dir = assert_fs::TempDir::new().unwrap();
// with_working_dir returns Err when not in a repo // with_working_dir returns Err when not in a repo
let temp_dir = assert_fs::TempDir::new().unwrap();
let executor = JjLib::with_working_dir(temp_dir.path()).await; let executor = JjLib::with_working_dir(temp_dir.path()).await;
assert!(executor.is_err()); assert!(executor.is_err());
// Use an executor from a valid repo and try to describe a non-existent revset let valid_dir = assert_fs::TempDir::new().unwrap();
let executor = JjLib::with_working_dir(std::path::Path::new(".")) init_jj_repo(valid_dir.path())
.await .await
.unwrap(); .expect("Failed to init jj repo");
let executor = JjLib::with_working_dir(valid_dir.path()).await.unwrap();
let result = executor let result = executor
.describe("this-bookmark-does-not-exist", "test: should fail") .describe("this-bookmark-does-not-exist", "test: should fail")
.await; .await;
@@ -527,9 +528,8 @@ mod tests {
#[tokio::test] #[tokio::test]
async fn jj_lib_implements_jj_executor_trait() { async fn jj_lib_implements_jj_executor_trait() {
let lib = JjLib::with_working_dir(std::path::Path::new(".")).await; fn assert_implements<T: JjExecutor>() {}
fn accepts_executor(_: impl JjExecutor) {} assert_implements::<JjLib>();
accepts_executor(lib.unwrap());
} }
mod user_config_paths_tests { mod user_config_paths_tests {