From: Jacob Keller <jacob.keller@gmail.com>
To: Jeff King <peff@peff.net>
Cc: "Kyle J. McKay" <mackyle@gmail.com>,
Git mailing list <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/5] pretty: allow formatting DATE_SHORT
Date: Thu, 29 Sep 2016 23:17:57 -0700 [thread overview]
Message-ID: <CA+P7+xoxTpqn=jkuHYp5pKCCWfKLP5OKCTBYkcTVw_RhEw0KVw@mail.gmail.com> (raw)
In-Reply-To: <20160929083342.ozo2tef45hu4ox7g@sigill.intra.peff.net>
On Thu, Sep 29, 2016 at 1:33 AM, Jeff King <peff@peff.net> wrote:
> There's no way to do this short of "%ad" and --date=short,
> but that limits you to having a single date format in the
> output.
>
> This would possibly be better done with something more like
> "%ad(short)".
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> pretty.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/pretty.c b/pretty.c
> index 493edb0..c532c17 100644
> --- a/pretty.c
> +++ b/pretty.c
> @@ -727,6 +727,9 @@ static size_t format_person_part(struct strbuf *sb, char part,
> case 'I': /* date, ISO 8601 strict */
> strbuf_addstr(sb, show_ident_date(&s, DATE_MODE(ISO8601_STRICT)));
> return placeholder_len;
> + case 's':
> + strbuf_addstr(sb, show_ident_date(&s, DATE_MODE(SHORT)));
> + return placeholder_len;
> }
>
> skip:
> --
> 2.10.0.566.g5365f87
>
Nice. I use date=short in some of my aliases and switching to this is
nicer. I assume this turns into "%(as)"?
What about documenting this in pretty-formats.txt?
Thanks,
Jake
next prev parent reply other threads:[~2016-09-30 6:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-29 5:34 [PATCH/RFC] git log --oneline alternative with dates, times and initials Kyle J. McKay
2016-09-29 8:33 ` Jeff King
2016-09-29 8:33 ` [PATCH 1/5] pretty: allow formatting DATE_SHORT Jeff King
2016-09-30 6:17 ` Jacob Keller [this message]
2016-09-30 10:56 ` SZEDER Gábor
2016-09-30 22:04 ` Jacob Keller
2016-10-01 9:18 ` Jeff King
2016-09-29 8:36 ` [PATCH 2/5] pretty: allow formatting names as initials Jeff King
2016-09-29 17:31 ` Junio C Hamano
2016-09-29 17:32 ` Jeff King
2016-09-29 8:37 ` [PATCH 3/5] graph: fix extra spaces in graph_padding_line Jeff King
2016-09-29 8:38 ` [PATCH 4/5] graph: helper functions for printing commit header Jeff King
2016-09-29 8:38 ` [PATCH 5/5] log: add --commit-header option Jeff King
2016-09-29 17:49 ` Junio C Hamano
2016-09-29 18:31 ` Jeff King
2016-09-29 11:00 ` [PATCH/RFC] git log --oneline alternative with dates, times and initials Kyle J. McKay
2016-09-29 12:52 ` Jeff King
2016-09-29 17:38 ` Junio C Hamano
2016-09-29 18:30 ` Jeff King
2016-09-29 18:50 ` Junio C Hamano
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='CA+P7+xoxTpqn=jkuHYp5pKCCWfKLP5OKCTBYkcTVw_RhEw0KVw@mail.gmail.com' \
--to=jacob.keller@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mackyle@gmail.com \
--cc=peff@peff.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.