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

Re: [PATCH 1/5] pretty: allow formatting DATE_SHORT

From
SZEDER Gábor <szeder@ira.uka.de>
Date
Sep 30, 2016, 10:56 UTC
Message-ID
<20160930105639.15589-1-szeder@ira.uka.de>
In-Reply-To
<CA+P7+xoxTpqn=jkuHYp5pKCCWfKLP5OKCTBYkcTVw_RhEw0KVw@mail.gmail.com>
Show 35 quoted lines
> 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?
Here you go :)
  http://public-inbox.org/git/1444235305-8718-1-git-send-email-szeder@ira.uka.de/
Previous: Jacob KellerNext: Jacob Keller
Message 5 of 20 in “git log --oneline alternative with dates, times and initials”
  1. git log --oneline alternative with dates, times and initialsKyle J. McKay, Sep 29, 2016
  2. Jeff KingSep 29, 2016
  3. 1/5 pretty: allow formatting DATE_SHORTJeff King, Sep 29, 2016
  4. Jacob KellerSep 30, 2016
  5. SZEDER GáborSep 30, 2016
  6. Jacob KellerSep 30, 2016
  7. Jeff KingOct 1, 2016
  8. 3/5 graph: fix extra spaces in graph_padding_lineJeff King, Sep 29, 2016
  9. 4/5 graph: helper functions for printing commit headerJeff King, Sep 29, 2016
  10. 2/5 pretty: allow formatting names as initialsJeff King, Sep 29, 2016
  11. Junio C HamanoSep 29, 2016
  12. Jeff KingSep 29, 2016
  13. 5/5 log: add --commit-header optionJeff King, Sep 29, 2016
  14. Junio C HamanoSep 29, 2016
  15. Jeff KingSep 29, 2016
  16. Kyle J. McKaySep 29, 2016
  17. Jeff KingSep 29, 2016
  18. Junio C HamanoSep 29, 2016
  19. Jeff KingSep 29, 2016
  20. Junio C HamanoSep 29, 2016

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.