feat: Improve jujutsu ux with rad

This commit is contained in:
ulic-youthlic 2026-01-14 14:21:45 +08:00
parent 67c35b2dc5
commit e008184451
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
2 changed files with 23 additions and 4 deletions

View file

@ -45,8 +45,11 @@
};
git = {
enable = true;
settings.user = {
inherit (cfg) email name;
settings = {
alias.patch = "push rad HEAD:refs/patches";
user = {
inherit (cfg) email name;
};
};
lfs.enable = true;
};

View file

@ -42,6 +42,12 @@ in {
enable = true;
settings = {
"$schema" = "https://jj-vcs.github.io/jj/latest/config-schema.json";
aliases = {
dlog = ["log" "-r"];
l = ["log" "-r" "(trunk()..@):: | (trunk()..@)-"];
fresh = ["new" "trunk()"];
tug = ["bookmark" "move" "--from" "closest_bookmark(@)" "--to" "closest_pushable(@)"];
};
snapshot = {
auto-track = "true";
max-new-file-size = 0;
@ -77,8 +83,18 @@ in {
"format_short_signature(signature)" = "signature";
};
revset-aliases = {
"immutable_heads()" = ''
builtin_immutable_heads() | (trunk().. & ~mine())
"closest_bookmark(to)" = "heads(::to & bookmarks())";
"closest_pushable(to)" = "heads(::to & mutable() & ~description(exact:\"\") & (~empty() | merges()))";
"desc(x)" = "description(x)";
"pending()" = ".. ~ ::tags() ~ ::remote_bookmarks() ~ @ ~ private()";
"private()" = ''
description(glob:'wip:*') |
description(glob:'private:*') |
description(glob:'WIP:*') |
description(glob:'PRIVATE:*') |
conflicts() |
(empty() ~ merges()) |
description(substring-i:"DO NOT NAIL")
'';
};
git = {