diff --git a/src/config/templates.toml b/src/config/templates.toml index 2223e62bf..5403bc981 100644 --- a/src/config/templates.toml +++ b/src/config/templates.toml @@ -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", ) ''' diff --git a/tests/test_show_command.rs b/tests/test_show_command.rs index 9039c65f5..66fcbac2e 100644 --- a/tests/test_show_command.rs +++ b/tests/test_show_command.rs @@ -31,7 +31,7 @@ fn test_show() { Author: Test User (2001-02-03 04:05:07.000 +07:00) Committer: Test User (2001-02-03 04:05:07.000 +07:00) - (no description set) + (no description set) "###); } @@ -60,6 +60,6 @@ fn test_show_relative_timestamps() { Author: Test User (...timestamp...) Committer: Test User (...timestamp...) - (no description set) + (no description set) "###); }