dotfiles/vcs/jj/config/jj/config.toml

79 lines
2.2 KiB
TOML

[user]
email = "contact@martyoeh.me"
name = "Marty Oehme"
[signing]
backend = "gpg"
key = "73BA40D5AFAF49C9"
[git]
sign-on-push = true
private-commits = "description(glob-i:'WIP:*') | description(glob-i:'PRIVATE:*')" # refuse to push WIP commits
[ui]
default-command = "log"
diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"]
pager = "delta"
[ui.diff]
format = "git" # for the time being to use delta well
[aliases]
# see: https://shaddy.dev/notes/jj-tug/, update most recent bookmark
tug = ["bookmark", "move", "--from", "heads(::@- & bookmarks())", "--to", "@-"]
[templates]
# Add git diffs to commit drafts
draft_commit_description = '''
concat(
description,
surround(
"\nJJ: This commit contains the following changes:\n", "",
indent("JJ: ", diff.stat(72)),
),
"\nJJ: ignore-rest\n",
diff.git(),
)
'''
[template-aliases]
# Changed order of normal oneliner around:
# keep revID, but then first thing bookmarks/tags/head and descriptions
# only afterwards show email, timesatmp, commitID since I am less interested
builtin_log_oneline = '''
if(root,
format_root_commit(self),
label(if(current_working_copy, "working_copy"),
concat(
separate(" ",
format_short_change_id_with_hidden_and_divergent_info(self),
if(conflict, label("conflict", "conflict")),
bookmarks,
tags,
if(description,
description.first_line(),
label(if(empty, "empty"), description_placeholder),
),
if(author.email(), author.email().local(), email_placeholder),
format_timestamp(commit_timestamp(self)),
working_copies,
format_short_commit_id(commit_id),
if(config("ui.show-cryptographic-signatures").as_boolean(),
format_short_cryptographic_signature(signature)),
if(empty, label("empty", "(empty)")),
if(git_head, label("git_head", "git_head()")),
) ++ "\n",
),
)
)
'''
[revsets]
log = "ancestors(@, 5) | ancestors(trunk()..(visible_heads() & mine()), 2) | trunk()"
[revset-aliases]
"bases" = "dev"
"downstream(x,y)" = "(x::y) & y"
"branches" = "downstream(trunk(), bookmarks()) & mine()"
"curbranch" = "latest(branches::@- & branches)"
"githead" = "::git_head()"