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