git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Yucheng Zhou <zhouyucheng98@outlook.com>
Cc: git@vger.kernel.org
Subject: Re: Feature request for shorter relative date format in log
Date: Wed, 2 Aug 2023 14:12:25 -0400	[thread overview]
Message-ID: <ZMqciat7tdbYGob8@nand.local> (raw)
In-Reply-To: <ME3P282MB2274D11DC15DF1FDBBC36C3DBE0BA@ME3P282MB2274.AUSP282.PROD.OUTLOOK.COM>

On Wed, Aug 02, 2023 at 02:07:16PM +0800, Yucheng Zhou wrote:
> 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

  reply	other threads:[~2023-08-02 18:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02  6:07 Feature request for shorter relative date format in log Yucheng Zhou
2023-08-02 18:12 ` Taylor Blau [this message]
2023-08-02 22:31   ` Junio C Hamano
2023-08-03  2:54     ` Yucheng Zhou
2023-08-04 18:24     ` Taylor Blau

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=ZMqciat7tdbYGob8@nand.local \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=zhouyucheng98@outlook.com \
    /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).