-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjj-config.toml
More file actions
94 lines (79 loc) · 3.43 KB
/
jj-config.toml
File metadata and controls
94 lines (79 loc) · 3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
"$schema" = "https://jj-vcs.github.io/jj/latest/config-schema.json"
[user]
name = "Ethan Lowman"
email = "git@ethanlowman.com"
[git]
private-commits = "description('dnl:*') | description('DNL:*')"
[templates]
git_push_bookmark = '"ethan/" ++ change_id.short()'
# git_push_bookmark = '"ethan/" ++ description.first_line().lower().replace(regex:"[^a-z0-9 ]", "").trim().replace(regex:" +", "-") ++ "-" ++ change_id.short()'
[revsets]
short-prefixes = "(mine_flexible() & (mutable() | bookmarks())) | tracked_remote_bookmarks()"
[ui]
revsets-use-glob-by-default = true
diff-formatter = ":git"
# default-command = ["log", "-r", "trunk() | local_trunk() | (mine_flexible() & local_trunk()..)"]
default-command = [
"log",
"-r",
# "trunk() | (mine_flexible() & mutable() & ~(empty() & description(exact:'') & trunk()+ & ~@)) | (tracked_remote_bookmarks() & ~::trunk())::",
"trunk() | (tracked_remote_bookmarks() & ~::trunk()):: | (mutable() & mine_flexible())::",
# "(trunk() | (~::trunk() & ::@ & (~mine() | mutable())) | (mine() & ~::untracked_remote_bookmarks()) & mutable()| tracked_remote_bookmarks())",
"--no-pager",
"-T",
'''
separate(" ",
format_short_change_id_with_change_offset(self),
separate(commit_summary_separator,
bookmarks.filter(|b| !b.name().ends_with("-git-worktree")),
if(!self.mine(), self.author().name()),
if(!self.current_working_copy(), self.working_copies()),
separate(" ",
if(conflict, label("conflict", "(conflict)")),
if(empty, label("empty", "(empty)")),
if(description,
description.first_line(),
label(if(empty, "empty"), description_placeholder),
),
),
),
format_short_commit_id(commit_id),
)
''',
]
diff-editor = ":builtin"
pager = [
"sh",
"-c",
"delta --side-by-side --minus-style 'syntax #500000' --plus-style 'syntax #005000' --file-transformation \"s|^|> $(jj root)/|g\" -w $(tput cols) | less -F",
]
[colors]
"node working_copy" = { fg = "magenta", bold = false }
"prefix" = { fg = "bright magenta", bold = true }
[aliases]
up = ["edit", "-r", "@+"]
down = ["edit", "-r", "@-"]
sq = ["squash"]
rb = ["rebase"]
cp = ["duplicate"]
ll = ["log", "-r", "::@ | @::"]
tug = ["bookmark", "move", "--from", "heads(::@ & bookmarks()) & ~trunk()", "--to", "closest_pushable(@)"]
mug = ["bookmark", "move", "--from", "heads(::@ & bookmarks()) & trunk()", "--to", "closest_pushable(@)"]
watch = ["util", "exec", "--", "sh", "-c", "viddy -t -n 1 jj --color=always --ignore-working-copy"]
push = ["git", "push"]
fetch = ["git", "fetch"]
pr = ["util", "exec", "--", "bash", "-c", "GH_PAGER='' gh pr view --json title,url --template '{{ .title }}, {{ .url }}' $(jj log -T 'local_bookmarks' --no-graph -r 'heads(bookmarks() & ::@)'); echo"]
stacks = ["util", "exec", "--", "jj-pancake", "stacks"]
sync = ["util", "exec", "--", "jj-pancake", "sync"]
submit = ["util", "exec", "--", "jj-pancake", "submit"]
restack = ["util", "exec", "--", "jj-pancake", "restack"]
# watch = ["stack", "--tui"]
[revset-aliases]
"mine_flexible()" = "mine() | author_name('Ethan Lowman')"
"local_trunk()" = "latest(bookmarks(exact:'trunk') | bookmarks(exact:'main') | bookmarks(exact:'master')) | bookmarks(exact:'default')"
"closest_pushable(to)" = "heads(::to & mutable() & ~description(exact:'') & (~empty() | merges()))"
"m()" = "first_ancestors(trunk())"
"fa(r)" = "first_ancestors(r)"
[fix.tools.rustfmt]
command = ["rustfmt", "+nightly", "--emit", "stdout"]
patterns = ["glob:'**/*.rs'"]