From: Jeff King <peff@peff.net>
To: Thomas Rast <trast@student.ethz.ch>
Cc: Junio C Hamano <gitster@pobox.com>,
Jef Driesen <jefdriesen@hotmail.com>,
Nanako Shiraishi <nanako3@lavabit.com>,
git@vger.kernel.org
Subject: Re: [PATCH v2 0/5] Pretty formats for reflog data
Date: Fri, 16 Oct 2009 01:20:03 -0400 [thread overview]
Message-ID: <20091016052003.GA10629@coredump.intra.peff.net> (raw)
In-Reply-To: <cover.1255645570.git.trast@student.ethz.ch>
On Fri, Oct 16, 2009 at 12:41:43AM +0200, Thomas Rast wrote:
> Jeff King wrote:
> > Maybe a better solution would be a "short name" variant for pretty
> > format specifiers. We already have %(refname) and %(refname:short) [...]
> > The tricky part would be deciding on a syntax. This seems to come up a
> > fair bit.
>
> Ok, I settled for %g[dDs] for now to save on letters. I'm saving the
> syntax question for a later series while we discuss this one ;-)
:) That is probably sensible. Your %g[dD] doesn't support selecting
between the numbered version and the "date" version, which is something
we might want, but certainly it is no worse than the status quo (and
doing something like that probably _would_ want an extended syntax, as
you now have two orthogonal arguments: shorten and date/numbered).
> I think going for %(...) wouldn't be too bad since we already have
> that in for-each-ref, and it can be backwards compatible. So we would
> have different sets of short and long specifiers, e.g.
>
> %ae = %(authoremail)
> %aE = %(authoremail:mailmap)
>
> We can then pass arguments via some yet-to-be decided syntax, say,
> %(body:indent(10)).
That seems reasonable to me, though if we can limit ourselves to one
argument per specifier (I suspect most specifiers would simply be
boolean, but a few may take numbers or strings), then something like
%(body:indent=10) might be a little more readable.
It would also be nice to have some sort of conditional inclusion, which
could deal with your extra ": " in patch 3. Either something like:
%(reflog:short)%(reflog:+: )
or even
%(reflog:short:prefix=\: )
and note that allowing arbitrary arguments means we get to deal with
quoting.
But that is all for another potential series.
> Other changes in this version include:
>
> * I followed your struct suggestion, which is the new 1/5.
Thanks. It looks like it didn't turn out to be too invasive, and I think
some of the callsites are a bit more readable.
> * I fixed the warning that Junio found (and finally found the right
> combination of -W flags, though I cannot compile with -Werror myself
> because of *other* warnings...)
I always compile with -Wall -Werror (including testing your series);
what warnings are you getting?
> Thomas Rast (5):
> Refactor pretty_print_commit arguments into a struct
> reflog-walk: refactor the branch@{num} formatting
> Introduce new pretty formats %g[sdD] for reflog information
> stash list: use new %g formats instead of sed
> stash list: drop the default limit of 10 stashes
Thanks, this series looks really good to me. I have a few comments on
patch 3 which I'll send separately.
-Peff
next prev parent reply other threads:[~2009-10-16 5:23 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-12 15:47 git stash list with more than 10 items? Jef Driesen
2009-10-12 17:52 ` Jeff King
2009-10-12 19:37 ` [PATCH] git-stash documentation: mention default options for 'list' Miklos Vajna
2009-10-12 19:39 ` Jeff King
2009-10-12 21:06 ` [RFC PATCH 0/5] Pretty formats for reflog data Thomas Rast
2009-10-12 21:06 ` [RFC PATCH 1/5] reflog-walk: refactor the branch@{num} formatting Thomas Rast
2009-10-12 21:06 ` [RFC PATCH 2/5] Introduce new pretty formats %g and %G for reflog information Thomas Rast
2009-10-14 4:59 ` Jeff King
2009-10-14 9:58 ` Thomas Rast
2009-10-14 9:13 ` Junio C Hamano
2009-10-12 21:06 ` [RFC PATCH 3/5] stash: Use new %g/%G formats instead of sed Thomas Rast
2009-10-14 5:00 ` Jeff King
2009-10-12 21:06 ` [RFC PATCH 4/5] stash list: drop the default limit of 10 stashes Thomas Rast
2009-10-14 5:02 ` Jeff King
2009-10-12 21:06 ` [RFC PATCH 5/5] stash: change built-in ref to 'stash' instead of 'refs/stash' Thomas Rast
2009-10-14 5:06 ` Jeff King
2009-10-15 22:41 ` [PATCH v2 0/5] Pretty formats for reflog data Thomas Rast
2009-10-15 22:41 ` [PATCH v2 1/5] Refactor pretty_print_commit arguments into a struct Thomas Rast
2009-10-15 22:41 ` [PATCH v2 2/5] reflog-walk: refactor the branch@{num} formatting Thomas Rast
2009-10-15 22:41 ` [PATCH v2 3/5] Introduce new pretty formats %g[sdD] for reflog information Thomas Rast
2009-10-16 5:32 ` Jeff King
2009-10-16 8:50 ` Thomas Rast
2009-10-16 14:20 ` [PATCH v3 0/5] Pretty formats for reflog data Thomas Rast
2009-10-16 14:20 ` [PATCH v3 1/5] Refactor pretty_print_commit arguments into a struct Thomas Rast
2009-10-17 17:05 ` Junio C Hamano
2009-10-18 18:51 ` Thomas Rast
2009-10-18 22:47 ` Junio C Hamano
2009-10-19 15:48 ` [PATCH v4 0/5] Pretty formats for reflog data Thomas Rast
2009-10-19 15:48 ` [PATCH v4 1/5] Refactor pretty_print_commit arguments into a struct Thomas Rast
2009-10-19 15:48 ` [PATCH v4 2/5] reflog-walk: refactor the branch@{num} formatting Thomas Rast
2009-10-19 15:48 ` [PATCH v4 3/5] Introduce new pretty formats %g[sdD] for reflog information Thomas Rast
2009-10-19 15:48 ` [PATCH v4 4/5] stash list: use new %g formats instead of sed Thomas Rast
2009-10-19 15:48 ` [PATCH v4 5/5] stash list: drop the default limit of 10 stashes Thomas Rast
2009-10-16 14:20 ` [PATCH v3 2/5] reflog-walk: refactor the branch@{num} formatting Thomas Rast
2009-10-16 14:20 ` [PATCH v3 3/5] Introduce new pretty formats %g[sdD] for reflog information Thomas Rast
2009-10-17 14:48 ` [PATCH v3.1 " Thomas Rast
2009-10-17 15:06 ` Jakub Narebski
2009-10-18 7:18 ` Jeff King
2009-10-18 10:34 ` Nanako Shiraishi
2009-10-16 14:20 ` [PATCH v3 4/5] stash list: use new %g formats instead of sed Thomas Rast
2009-10-16 14:20 ` [PATCH v3 5/5] stash list: drop the default limit of 10 stashes Thomas Rast
2009-10-17 0:50 ` [PATCH v3 0/5] Pretty formats for reflog data Junio C Hamano
2009-10-17 1:18 ` Jeff King
2009-10-15 22:41 ` [PATCH v2 4/5] stash list: use new %g formats instead of sed Thomas Rast
2009-10-15 22:41 ` [PATCH v2 5/5] stash list: drop the default limit of 10 stashes Thomas Rast
2009-10-16 5:20 ` Jeff King [this message]
2009-10-16 9:00 ` [PATCH v2 0/5] Pretty formats for reflog data Jakub Narebski
2009-10-12 21:37 ` [RFC PATCH " Jeff King
2009-10-12 21:52 ` Thomas Rast
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=20091016052003.GA10629@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jefdriesen@hotmail.com \
--cc=nanako3@lavabit.com \
--cc=trast@student.ethz.ch \
/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).