summaryrefslogtreecommitdiff
path: root/jj_config.toml
blob: d5ce62f7466e7185159b1bc5e3b0b26df0b618dc (plain)
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
"$schema" = "https://jj-vcs.github.io/jj/latest/config-schema.json"

[ui]
diff-formatter = ["difft", "--color=always", "$left", "$right"]

[revset-aliases]
'closest_bookmark(to)' = 'heads(::to & bookmarks())'

[aliases]
tug = ["bookmark", "move", "--from", "closest_bookmark(@-)", "--to", "@-"]
ml = ["log", "-r", "visible_heads() & mine()"]
lf = ["log", "-r", "visible_heads()"]
pull = ["util", "exec", "--", "sh", "-c", '''
  target="$(
  jj bookmark list -r 'exactly(closest_bookmark(@-), 1)' \
    -T 'name ++ "\n"' 2>/dev/null
)" || target=""

  jj git fetch || exit $?

  if [ -n "$target" ]; then
    jj new "$target";
  fi;
''']

[templates]
git_push_bookmark = '"tslil/push-" ++ change_id.short()'
draft_commit_description = '''
          concat(
            coalesce(description, default_commit_description, "\n"),
            surround(
              "\nJJ: This commit contains the following changes:\n", "",
              indent("JJ:     ", diff.stat(72)),
            ),
            "\nJJ: ignore-rest\n",
            diff.git(),
          )'''