惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
博客园 - 三生石上(FineUI控件)
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
V
Visual Studio Blog
小众软件
小众软件
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
MongoDB | Blog
MongoDB | Blog
V
V2EX
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
The Cloudflare Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Engineering at Meta
Engineering at Meta
L
LangChain Blog
Martin Fowler
Martin Fowler
GbyAI
GbyAI
博客园 - 司徒正美

Lobsters

Lunacy | Red Vice CIFSwitch: a non-universal Linux local root vulnerability RIPE NCC session fixation: poaching logins with an Atlas probe GNOME 2.20 but its Web Components Agentic Search for Context Engineering – Leonie Monigatti Garnix is shutting down [not OC] Concerning Emacs (and Jazz) Nitpicking the shell history scene in ‘Tron: Legacy’ What's cooking on SourceHut? Q2 2026 The tenth OpenPGP email summit Package managers that package package managers Clojure on Fennel part three: parsing WordPress at 23 Finding Miscompiles for Fun, Not Profit GitHub - creusot-rs/creusot: Creusot helps you prove your Rust code is correct. Announcing Rust 1.96.0 | Rust Blog A Love Letter to Neovim sqlite AGENTS.md Am I a Bad Friend? CSS vs. JavaScript • Josh W. Comeau Erlang Ecosystem Foundation - Supporting the BEAM community A brief note about slot access cost in Common Lisp Keyboard latency probe Rethinking the GNOME clipboard issues Back to the Building Blocks’ Building Blocks Tech Notes: Theseus: translating win32 to wasm Fast is better than slow Content-addressed Rust builds (or, what kache actually caches) Intent to Prototype: Embedding API Canada’s Bill C-22 and the security cost of collecting more data
akashina.tngl.sh/jjc
Tangled · 2026-05-28 · via Lobsters

Non-interactive hunk-level operations for Jujutsu. Scriptable alternative to jj split's interactive mode.

Requires jj v0.41.0.

Install#

cargo install --git https://tangled.sh/akashina.tngl.sh/jjc  # or from local checkout:
cargo install --path .

Commands#

jjc hunks — list hunks#

jjc hunks                    # list all hunks in @
jjc hunks --from main        # list hunks in a specific revision
jjc hunks -r @-              # shorthand for --from
jjc hunks abc123             # inspect a single hunk (by ID or prefix)
jjc hunks --full             # include numbered diff lines
jjc hunks --blame            # annotate each line with originating commit

--from accepts any revset that resolves to one revision. Hunks are listed for that revision's diff against its parent, so jjc hunks --from @- shows the parent commit's own hunks rather than the working copy's hunks.

Default output shows a changed-lines preview (up to 4 lines):

a1b[2c3d4e5f6] src/main.rs (+3 -1)
  +    println!("new line");
  -    old_call();

f09[8a7b6c5d4e] src/lib.rs (+1 -0)
  +use std::io;

--full adds context lines with line numbers, and lists change atoms when a hunk has more than one:

a1b[2c3d4e5f6] src/main.rs (+3 -1)
  1: fn main() {
  2:+    println!("new line");
  3:-    old_call();
  4: }
  a1b[2c3d4e5f6]#1 @2 a1b[2c3d4e5f6]#2 @3

Hunk IDs use bracket-style prefix highlighting (same as jj log): a1b[2c3d4e5f6] means a1b is the shortest unique prefix.

jjc pick — split hunks into a new commit#

jjc pick a1b -m "extract logging"        # pick entire hunk
jjc pick a1b#2 -m "fix off-by-one"       # pick a single change atom
jjc pick a1b@15-20 -m "refactor"         # pick by target line range
jjc pick a1b c3d -r foo -m "partial"     # pick multiple hunks from revision foo

Creates a new commit with the selected hunks, then rewrites the source revision on top of it (like jj split but non-interactive).

jjc drop — revert hunks to parent content#

jjc drop a1b           # drop a hunk from @
jjc drop a1b c3d       # drop multiple hunks

Rewrites the revision in place with selected hunks reverted. Like "Revert Hunk" in a diff editor.

jjc fold — squash hunks into another revision#

jjc fold a1b --into main              # fold hunk from @ into main
jjc fold a1b -r feat --into main      # fold from a specific source
jjc fold --select feat:a1b,c3d        # multi-source with explicit assignment

Hunk selectors#

All write commands (pick, drop, fold) accept hunk selectors:

Form Meaning
a1b Entire hunk matching ID prefix a1b
a1b#2 Change atom #2 within the hunk
a1b@15 Lines covering target line 15
a1b@10-20 Lines covering target range 10-20

Use jjc hunks to discover IDs and atom indices.

How it works#

jjc reads the jj repository directly via jj-lib. It loads your jj config (user, repo, workspace layers), snapshots the working copy, and commits transactions with proper descendant rebasing and working copy updates. No jj commands are shelled out or proxied.

Limitations#

  • Only text file hunks are supported. Binary files, renames, copies, additions, and deletions are listed as unsupported.
  • Immutable commit checking is minimal (root commit only). Use jj log to verify before rewriting shared history.