git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-archive doesn't support --date= option for %ad & %cd format:<string>'s

From
Jeff King <peff@peff.net>
Date
Oct 9, 2014, 19:27 UTC
Message-ID
<20141009192742.GC415@peff.net>
In-Reply-To
<20141009192428.GB415@peff.net>
On Thu, Oct 09, 2014 at 03:24:28PM -0400, Jeff King wrote:
Show 16 quoted lines
> 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.
> [...]

I meant to add in here: ...so an external "--date" option does not seem like that bad an idea. I think calling it "--date" is probably a mistake, but something like "--subst-date-format" or something might make more sense.

-Peff
Previous: Jeff KingNext: Derek Moore
Message 3 of 4 in “git-archive doesn't support --date= option for %ad & %cd format:<string>'s”
  1. Derek MooreOct 9, 2014
  2. Jeff KingOct 9, 2014
  3. Jeff KingOct 9, 2014
  4. Derek MooreOct 9, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.