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

Re: Feature request for shorter relative date format in log

From
Taylor Blau <me@ttaylorr.com>
Date
Aug 2, 2023, 18:12 UTC
Message-ID
<ZMqciat7tdbYGob8@nand.local>
In-Reply-To
<ME3P282MB2274D11DC15DF1FDBBC36C3DBE0BA@ME3P282MB2274.AUSP282.PROD.OUTLOOK.COM>
On Wed, Aug 02, 2023 at 02:07:16PM +0800, Yucheng Zhou wrote:
Show 12 quoted lines
> Hello there,
>
> I usually use --date=relative in git log, but I find it can be shorter
> to save more space and be more efficient.
>
> First, the trailing “ago” can be removed, because it seems every
> relative date has a trailing ago.  Second, the seconds, minutes,
> hours, days, weeks, months, and years can be shorten to a single
> letter (e.g., s, m, h, d, w, M, Y), and the suffix “s” for plural can
> also be removed in this case.  Maybe it will be better to give us a
> way to customize it, or create a new to config like
> --date=relative-short.
I can't think of a way that this is possible to do currently.

You can customize the format of absolute dates by using `--date=format:xyz' where xyz is passed as an argument to the system's strftime() implementation.

But we don't have a way for users to provide custom over relative dates. Perhaps we should?

Thanks, Taylor

Previous: Yucheng ZhouNext: Junio C Hamano
Message 2 of 5 in “Feature request for shorter relative date format in log”
  1. Yucheng ZhouAug 2, 2023
  2. Taylor BlauAug 2, 2023
  3. Junio C HamanoAug 2, 2023
  4. Yucheng ZhouAug 3, 2023
  5. Taylor BlauAug 4, 2023

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.