aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/pretty-formats.txt
diff options
context:
space:
mode:
authorZheNing Hu <adlternative@gmail.com>2021-04-25 10:41:45 +0000
committerJunio C Hamano <gitster@pobox.com>2021-04-27 16:09:32 +0900
commitb722d4560e9d566cb8c6cdccf08d649df146eb6b (patch)
tree139de3aa4d73b836143c553ee3b1c7a51684e90e /Documentation/pretty-formats.txt
parent3593ebd3f502d28eb405ce502cd9fbd743afc3fe (diff)
downloadgit-b722d4560e9d566cb8c6cdccf08d649df146eb6b.tar.gz
pretty: provide human date format
Add the placeholders %ah and %ch to format author date and committer date, like --date=human does, which provides more humanity date output. Signed-off-by: ZheNing Hu <adlternative@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/pretty-formats.txt')
-rw-r--r--Documentation/pretty-formats.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 45133066e4..cd697f508c 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -190,6 +190,8 @@ The placeholders are:
'%ai':: author date, ISO 8601-like format
'%aI':: author date, strict ISO 8601 format
'%as':: author date, short format (`YYYY-MM-DD`)
+'%ah':: author date, human style (like the `--date=human` option of
+ linkgit:git-rev-list[1])
'%cn':: committer name
'%cN':: committer name (respecting .mailmap, see
linkgit:git-shortlog[1] or linkgit:git-blame[1])
@@ -206,6 +208,8 @@ The placeholders are:
'%ci':: committer date, ISO 8601-like format
'%cI':: committer date, strict ISO 8601 format
'%cs':: committer date, short format (`YYYY-MM-DD`)
+'%ch':: committer date, human style(like the `--date=human` option of
+ linkgit:git-rev-list[1])
'%d':: ref names, like the --decorate option of linkgit:git-log[1]
'%D':: ref names without the " (", ")" wrapping.
'%(describe[:options])':: human-readable name, like