From 80667fb919e70e807337bedbea4f0bd5db0c00dd Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Fri, 24 Oct 2025 02:32:58 +0900 Subject: [PATCH] feat(jj): jj revset aliases for mega-merge workflow Signed-off-by: Seongmin Lee --- jj/config.toml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/jj/config.toml b/jj/config.toml index 3b45a7a..8bd41cb 100644 --- a/jj/config.toml +++ b/jj/config.toml @@ -3,9 +3,11 @@ [aliases] su = ["squash"] tug = ["bookmark", "move", "--from", "heads(::@- & bookmarks())", "--to", "@-"] +# mega-merge pull +mp = ["rebase", "-b", "MM", "-d", "heads(MM- | trunk())"] [ui] -default-command = ["log", "--no-pager"] +default-command = ["log", "--no-pager", "-r", "@ | coalesce(mega_merge(), default()) | trunk()"] should-sign-off = true diff-formatter = ["difft", "--color=always", "--syntax-highlight=off", "$left", "$right"] # diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"] @@ -23,6 +25,15 @@ key = "~/.ssh/git-sign-key.pub" [git] write-change-id-header = true +private-commits = "description(glob:'wip:*') | description(glob:'private:*')" + +[revset-aliases] +'MM' = "description('[mega-merge]')" +'FP' = "fork_point(MM-)" +'wip' = "description(glob:'wip:*')" +'default()' = "@ | ancestors(immutable_heads().., 2) | trunk()" +'show(x)' = "@ | ancestors(..(x::) ~ immutable(), 2) | trunk()" +'mega_merge()' = "ancestors(..(MM::) ~ immutable(), 2)" [templates] draft_commit_description = ''' -- 2.51.2