Re: [PATCH 0/5] Support %(trailers) arguments in for-each-ref(1)

2017-09-30 Thread Jeff King
On Fri, Sep 29, 2017 at 11:22:33PM -0700, Taylor Blau wrote:

> Attached is a patch to extend Peff's recent work of adding parsing options to
> "--pretty=%(trailers)" by supporting those same options in 
> git-for-each-ref(1).

Thanks for working on this. The direction and general sketch of the
implementation look right to me. I noted a few problems inline, so this
isn't quite right to be picked up, but I think a v2 should get us pretty
close, if not all the way there.

-Peff


[PATCH 0/5] Support %(trailers) arguments in for-each-ref(1)

2017-09-30 Thread Taylor Blau
Hi,

Attached is a patch to extend Peff's recent work of adding parsing options to
"--pretty=%(trailers)" by supporting those same options in git-for-each-ref(1).

In summary, this patch adds correct behavior for the following options, when
given to git-for-each-ref(1):

  * --format="%(trailers:only)"

  * --format="%(trailers:unfold,unfold)"

  * --format="%(contents:trailers:only)"

  * --format="%(contents:trailers:unfold,unfold)"

I have changed the syntax for specifying multiple sub-arguments in
%(contents:trailers) and %(trailers) atoms to be ","-delimited instead of
%":"-delimited. This is consistent with similar atoms, and is described in
%greater detail in "pretty.c: delimit "%(trailers)" arguments with ","".

I am also new around here: this is my first patch that I am sending to the
mailing list, so this process is entirely new to me. My current focus is helping
maintain Git LFS [1] at GitHub. If I have made any mistakes in formatting these
patches or sending them, please let me know :-).

Thank you in advance.

--
- Taylor

[1]: https://git-lfs.github.com

Taylor Blau (5):
  pretty.c: delimit "%(trailers)" arguments with ","
  t6300: refactor %(trailers) tests
  ref-filter.c: add trailer options to used_atom
  ref-filter.c: use trailer_opts to format trailers
  ref-filter.c: parse trailers arguments with %(contents) atom

 Documentation/git-for-each-ref.txt |  7 ++-
 pretty.c   | 13 +++---
 ref-filter.c   | 38 +++-
 t/t4205-log-pretty-formats.sh  |  4 +-
 t/t6300-for-each-ref.sh| 88 +-
 5 files changed, 129 insertions(+), 21 deletions(-)

--
2.14.1.145.gb3622a4ee