diff --git a/jj/config.toml b/jj/config.toml index 2cf096e..11bc702 100644 --- a/jj/config.toml +++ b/jj/config.toml @@ -9,17 +9,47 @@ change_id = "cyan" "diff added" = { fg = "cyan", underline = false } "diff token" = {underline = false} "diff modified" = "magenta" + [aliases] s = ["st"] l = ["log"] d = ["diff"] signoff = ["--config=ui.editor='/home/troy0820/signoff.sh'", "describe"] +[templates] +log_node = ''' +coalesce( + if(current_working_copy, "●"), + if(immutable, "⊗", "○"), +) +''' + +[template-aliases] +"format_short_id(id)" = 'id.shortest(12).prefix() ++ "[" ++ id.shortest(12).rest() ++ "]"' +'format_timestamp(timestamp)' = "timestamp.ago()" +'format_short_signature(signature)' = "signature.email().local()" +'format_detailed_signature(signature)' = "signature.email().local()" + +builtin_log_detailed = ''' +"\n\n\n" ++ +concat( + "Change ID: " ++ format_short_id(change_id) ++ "\n", + "Commit ID: " ++ format_short_id(commit_id) ++ "\n", + surround("Bookmarks: ", "\n", separate(" ", local_bookmarks, remote_bookmarks)), + surround("Tags : ", "\n", tags), + "Author : " ++ format_detailed_signature(author) ++ "\n", + "Committer: " ++ format_detailed_signature(committer) ++ "\n", + indent(" ", + coalesce(description, label(if(empty, "empty"), description_placeholder) ++ "\n")), + "\n", +) +''' [ui] editor = "nvim" paginate = "auto" diff.format = "git" +show-cryptographic-signatures = true [diff.git] context = 6 @@ -32,3 +62,4 @@ key = "redacted" [git] auto-local-bookmark = true push-bookmark-prefix = "troy0820/feat-" +