From: Jeff King <peff@peff.net>
To: Derek Moore <derek.p.moore@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git-archive doesn't support --date= option for %ad & %cd format:<string>'s
Date: Thu, 9 Oct 2014 15:24:28 -0400 [thread overview]
Message-ID: <20141009192428.GB415@peff.net> (raw)
In-Reply-To: <CAMsgyKaHoZtAidWKD_YTggt_Xo0J7krFKHr2eFeg3XJ6H0bBXQ@mail.gmail.com>
On Thu, Oct 09, 2014 at 11:19:36AM -0500, Derek Moore wrote:
> PRETTY FORMATS' format:<string> documentation says, "%ad: author date
> (format respects --date= option)", and similarly for %cd.
>
> But git-archive does not support the --date= option for changing the
> date format in $Format:%ad$ or $Format:%cd$ substitution strings.
Correct. You can use %ai, %aD, etc to pick a format. But...
> Relatedly, I want a short RFC date, not a short ISO date, but there is
> only --date=short, which is ISO.
If you start adding new formats, we are likely going to run out of
reasonably-memorable letters.
We've discussed something like "%ad(rfc822)" in the past, and I even had
a patch:
http://article.gmane.org/gmane.comp.version-control.git/168512
but it got bogged down in a discussion on potentially expanding the
placeholder syntax to something more regular (probably
"%(authordate:rfc822"), like for-each-ref does. That's from 2011, and I
doubt anybody is working on it now.
> Would introducing --date=shortrfc and --date=shortiso be feasable,
> with --date=short aliasing to --date=shortiso. With a shortrfc, I
> could recreate SVN $Date$'s, which would be equivalent to $Format:%ai
> (%ad)$ when used with "git archive --date=shortrfc".
I don't see a big problem with that. But I wonder if we would do better
to introduce arbitrary strftime-like formatting, so we do not have to
keep adding new formats.
-Peff
next prev parent reply other threads:[~2014-10-09 19:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-09 16:19 git-archive doesn't support --date= option for %ad & %cd format:<string>'s Derek Moore
2014-10-09 19:24 ` Jeff King [this message]
2014-10-09 19:27 ` Jeff King
2014-10-09 19:30 ` Derek Moore
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=20141009192428.GB415@peff.net \
--to=peff@peff.net \
--cc=derek.p.moore@gmail.com \
--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).