From 06b667b48cabd3f26875907ccb4f4a38d023fa4e Mon Sep 17 00:00:00 2001 From: karitham Date: Fri, 11 Sep 2026 11:25:36 +0200 Subject: [PATCH] jj: add tug and push aliases --- modules/dev/vcs/jj.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/dev/vcs/jj.nix b/modules/dev/vcs/jj.nix index 7256848..cc26380 100644 --- a/modules/dev/vcs/jj.nix +++ b/modules/dev/vcs/jj.nix @@ -20,6 +20,17 @@ remotes."origin".auto-track-bookmarks = "glob:*"; revsets = { log = "..@ | branches | curbranch::@ | @::nextbranch | downstream(@, branchesandheads)"; + bookmark-advance-to = "closest_pushable(@)"; + }; + aliases = { + tug = [ + "bookmark" + "advance" + ]; + push = [ + "git" + "push" + ]; }; revset-aliases = { "immutable_heads()" = "builtin_immutable_heads() | (trunk().. & ~mine())"; @@ -29,6 +40,7 @@ "curbranch" = "latest(branches::@- & branches)"; "nextbranch" = "roots(@:: & branchesandheads)"; "top" = "heads(mine())"; + "closest_pushable(to)" = "heads(::to & mutable() & ~description(exact:\"\") & (~empty() | merges()))"; }; ui = { default-command = [ -- 2.51.2