From 922bd2c79ddd08d0090f7eeafe097a278fb7e6fe Mon Sep 17 00:00:00 2001 From: Amolith Date: Tue, 24 Feb 2026 18:32:14 -0700 Subject: [PATCH] chore(jj): add closest bookmark and tug --- dot_config/private_jj/config.toml.tmpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dot_config/private_jj/config.toml.tmpl b/dot_config/private_jj/config.toml.tmpl index 271347199ba3a654a7b1aaf63c0120c6bebd5627..86f8b9f699613f3fa887d789e43e54490fdb55ef 100644 --- a/dot_config/private_jj/config.toml.tmpl +++ b/dot_config/private_jj/config.toml.tmpl @@ -28,7 +28,11 @@ allowed-signers = "/home/amolith/.ssh/allowed_signers" sign-on-push = false {{- end }} +[revset-aliases] +'closest_bookmark(to)' = 'heads(::to & bookmarks())' + [aliases] +tug = ["bookmark", "move", "--from", "closest_bookmark(@-)", "--to", "@-"] {{- if ne .chezmoi.username "exedev" }} # Use `jj push` (this alias), not `jj git push`. # It signs only our own mutable unsigned commits in the push range, then pushes. @@ -61,7 +65,7 @@ if [ -z "$remote" ]; then remote="origin" fi -jj sign -r "mine() & mutable() & ~signed() & (remote_bookmarks(remote=${remote})..@)" +jj sign -r "mine() & mutable() & ~signed() & (remote_bookmarks(remote=${remote})..closest_bookmark(@))" jj git push "$@" """, ""] {{- end }}