From: Christophe GRENIER <grenier@cgsecurity.org>
To: git@vger.kernel.org
Subject: Bug in git-log --date=short --pretty=format:"%ad"
Date: Wed, 28 May 2008 15:49:35 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.1.10.0805281535560.8172@adsl.cgsecurity.org> (raw)
Hi,
According to the git-log man page, we can configure how date are
displayed:
--date={relative,local,default,iso,rfc}
Only takes effect for dates shown in human-readable format,
such as when using "--pretty".
But it doesn't work when a user supplied format is used:
git-log --date=short --pretty=format:"%ad"
Wed May 28 13:28:35 2008 +0200
Wed May 28 13:26:14 2008 +0200
...
instead of
2008-05-28
2008-05-28
...
In pretty.c, when pretty_print_commit() calls format_commit_message(),
dmode isn't passed as argument so format_commit_item() will never have
the date format specified at the command line.
This problem is present in git-1.5.5.3
Regards,
Christophe
--
,-~~-.___. ._.
/ | ' \ | |"""""""""| Christophe GRENIER
( ) 0 | | | grenier@cgsecurity.org
\_/-, ,----' | | |
==== !_!--v---v--"
/ \-'~; |""""""""| TestDisk & PhotoRec
/ __/~| ._-""|| | Data Recovery
=( _____|_|____||________| http://www.cgsecurity.org
next reply other threads:[~2008-05-28 14:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-28 13:49 Christophe GRENIER [this message]
2008-05-28 15:11 ` Bug in git-log --date=short --pretty=format:"%ad" Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.1.10.0805281535560.8172@adsl.cgsecurity.org \
--to=grenier@cgsecurity.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).