Scope jj sweep to my own empty commits and run it on pull
mine() guards against abandoning empty commits that are not mine.
pull now sweeps leftovers after the fetch and rebase.
Assisted-by: Claude Opus 4.8 via Claude Code
diff --git a/.config/jj/config.toml b/.config/jj/config.toml
index b96d901a..20b83d9d 100644
--- a/.config/jj/config.toml
+++ b/.config/jj/config.toml
@@ -111,7 +111,7 @@ edit = true
[aliases]
accuse = ["file", "annotate"]
jj = []
-sweep = ["abandon", "--revisions", 'trunk():: & empty() & ~bookmarks(exact:"mm")']
+sweep = ["abandon", 'trunk():: & empty() & ~bookmarks(exact:"mm") & mine()']
tug = ["util", "exec", "--", "bash", "-c", """
ref=${1:-@}
jj bookmark move --from "closest_bookmark($ref)" --to "closest_pushable($ref)"
@@ -130,6 +130,7 @@ pull = ["util", "exec", "--", "bash", "-c", """
jj git fetch
jj rebase --branch "visible_heads() & mutable()" --destination "trunk()"
jj simplify-parents
+ jj sweep
"""]
# https://github.com/jj-vcs/jj/discussions/3549