ok/jj
1
0
Fork 0
forked from mirrors/jj

cli: in "show" template, indent description like Git does

This commit is contained in:
Yuya Nishihara 2023-03-02 17:36:59 +09:00
parent 8f8a9c91bc
commit 5d184e6694
2 changed files with 3 additions and 4 deletions

View file

@ -60,7 +60,6 @@ show = 'show'
'format_timestamp(timestamp)' = 'timestamp'
# TODO: Add branches, tags, etc
# TODO: Indent the description like Git does
'show' = '''
concat(
"Commit ID: " ++ commit_id ++ "\n",
@ -68,7 +67,7 @@ concat(
"Author: " ++ author ++ " (" ++ format_timestamp(author.timestamp()) ++ ")\n",
"Committer: " ++ committer ++ " (" ++ format_timestamp(committer.timestamp()) ++ ")\n",
"\n",
if(description, description, description_placeholder ++ "\n"),
indent(" ", if(description, description, description_placeholder ++ "\n")),
"\n",
)
'''