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 }}