blob: 4f139eec245d601ddc4ce25dc8368d2f5a0fec8c [file] [log] [blame]
Copybara botca5ce642024-11-08 17:38:08 +01001[user]
2name = {{ .git.name | quote }}
3email = {{ .git.email | quote }}
4
5{{- if eq .env "work"}}
6[git]
7push-bookmark-prefix="feature/adria-vilanova-push-"
8{{- end}}
9
10[ui]
11default-command = "log"
12diff-editor = ":builtin"
13#diff-editor = "vimdirdiff"
14#diff-editor = "meld-3"
15
16[aliases]
17signoff = ["--config-toml=ui.editor='{{ .chezmoi.config.destDir }}/.jj-signoff.bash'", "commit"]
18so = ["--config-toml=ui.editor='{{ .chezmoi.config.destDir }}/.jj-signoff.bash'", "describe"]
19l = ["log"]
20ll = ["log", "--template", "full"]
21lll = ["log", "--template", "fuller"]
22opt = ["op", "log", "--template", "op_log_with_full_time"]
23
24[template-aliases]
25# From https://sourcegraph.com/github.com/martinvonz/jj@0a39cfdbe25977132bcbb669d81124542821cfdc/-/blob/cli/src/config/templates.toml
26full = '''
27if(root,
28 format_root_commit(self),
29 label(if(current_working_copy, "working_copy"),
30 concat(
31 separate(" ",
32 format_short_change_id_with_hidden_and_divergent_info(self),
33 format_short_signature(author),
34 format_timestamp(committer.timestamp()),
35 bookmarks,
36 tags,
37 working_copies,
38 git_head,
39 format_short_commit_id(commit_id),
40 if(conflict, label("conflict", "conflict")),
41 ) ++ "\n\n",
42 indent(" ",
43 separate(" ",
44 if(empty, label("empty", "(empty)")),
45 if(description, description, description_placeholder ++ "\n"),
46 )
47 )++ "\n",
48 ),
49 )
50)
51'''
52
53fuller = "builtin_log_detailed"
54
55op_log_with_full_time = '''
56label(if(current_operation, "current_operation"),
57 coalesce(
58 if(root, format_root_operation(self)),
59 format_operation_with_full_time(self),
60 )
61)
62'''
63
64'format_operation_with_full_time(op)' = '''
65 concat(
66 separate(" ", op.id().short(), op.user(), format_full_time_range(op.time())), "\n",
67 op.description().first_line(), "\n",
68 if(op.tags(), op.tags() ++ "\n"),
69 )
70'''
71
72'format_full_time_range(time_range)' = '''
73 format_timestamp(time_range.start()) ++ label("time", ", lasted ") ++ time_range.duration()'''
74
75[revset-aliases]
76"non-pushed" = "remote_bookmarks().. & mine()"
77"non-uploaded" = "non-pushed"