Explorar o código

jj: d, log_medium

raylu hai 4 meses
pai
achega
336cf72162
Modificáronse 1 ficheiros con 21 adicións e 1 borrados
  1. 21 1
      config/jj/config.toml

+ 21 - 1
config/jj/config.toml

@@ -18,7 +18,8 @@ key = '~/.ssh/id_ed25519.pub'
 sign-on-push = true
 
 [aliases]
-l = ['log', '-r', '(trunk()..@):: | ancestors(trunk()..@, 4) | bookmarks()', '-T', 'builtin_log_compact_full_description']
+d = ['diff']
+l = ['log', '-r', '(trunk()..@):: | ancestors(trunk()..@, 4) | bookmarks()', '-T', 'log_medium']
 ll = ['log', '-r', 'ancestors(present(@) | present(trunk()) | bookmarks() | tracked_remote_bookmarks() | visible_heads(), 2)']
 ls = ['log', '-r', '..(@ | present(trunk()))', '-T', 'builtin_log_compact_full_description']
 tug = ['bookmark', 'move', '--from', 'closest_bookmark(@)', '--to', 'closest_pushable(@)']
@@ -29,3 +30,22 @@ tug = ['bookmark', 'move', '--from', 'closest_bookmark(@)', '--to', 'closest_pus
 
 [template-aliases]
 'format_short_signature(signature)' = 'coalesce(signature.email().local(), email_placeholder)'
+log_medium = '''
+if(root,
+  format_root_commit(self),
+  label(if(current_working_copy, "working_copy"),
+    concat(
+      format_short_commit_header(self) ++ "\n",
+      separate(" ",
+        if(empty, label("empty", "(empty)")),
+        if(description,
+          description.first_line() ++ if(description.first_line().len() < description.trim_end().len(),
+            label("rest", "\n\t" ++ description.substr(description.first_line().len() + 2, -1).first_line())
+          ),
+          label(if(empty, "empty"), description_placeholder),
+        ),
+      ) ++ "\n",
+    ),
+  )
+)
+'''