"$schema" = "https://jj-vcs.github.io/jj/latest/config-schema.json" [aliases] su = ["squash"] tug = ["bookmark", "move", "--from", "heads(::@- & bookmarks())", "--to", "@-"] # mega-merge pull mp = ["rebase", "-b", "MM", "-d", "heads(MM- | trunk())"] mm = ["util", "exec", "--", "bash", "-c", """#!/usr/bin/env bash set -euo pipefail COMMAND="${1:-}" shift # remove the subcommand from the arg list case "$COMMAND" in add|a) [ $# -ne 2 ] && { echo "Add to " echo echo "Usage: jj mm add " exit 1 } jj rebase -s $1 -o "heads($1-) | $2" ;; del|d) [ $# -ne 2 ] && { echo "Usage: jj mm del "; exit 1; } jj rebase -s $1 -o "heads($1-) ~ $2" ;; clean) [ $# -ne 1 ] && { echo "Usage: jj mm clean "; exit 1; } jj rebase -s $1 -o "heads($1-)" ;; *) echo "Error: Unknown subcommand '$COMMAND'" echo "Usage: jj mm [add|del]" exit 1 ;; esac """, ""] [ui] 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"] # merge-editor = "vimdiff" # conflict-marker-style = "git" [user] name = "Seongmin Lee" email = "git@boltless.me" [signing] behavior = "own" backend = "ssh" key = "~/.ssh/git-sign-key.pub" [git] write-change-id-header = true # private-commits = "description(glob:'wip:*') | description(glob:'private:*')" [revset-aliases] 'MM' = "description(glob:'\\[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 = ''' concat( coalesce(description, default_commit_description, "\n"), if( config("ui.should-sign-off").as_boolean() && !description.contains("Signed-off-by: " ++ author.name()), "\nSigned-off-by: " ++ author.name() ++ " <" ++ author.email() ++ ">", ), surround( "\nJJ: This commit contains the following changes:\n", "", indent("JJ: ", diff.summary()), ), "\nJJ: ignore-rest\n", diff.git(), ) '''