On Tue, Nov 8, 2016 at 12:11 PM, Karthik Nayak <karthik.188@xxxxxxxxx> wrote: > This is part of unification of the commands 'git tag -l, git branch -l > and git for-each-ref'. This ports over branch.c to use ref-filter's > printing options. > > Initially posted here: $(gmane/279226). It was decided that this series > would follow up after refactoring ref-filter parsing mechanism, which > is now merged into master (9606218b32344c5c756f7c29349d3845ef60b80c). > > v1 can be found here: $(gmane/288342) > v2 can be found here: $(gmane/288863) > v3 can be found here: $(gmane/290299) > v4 can be found here: $(gmane/291106) > v5b can be found here: $(gmane/292467) > v6 can be found here: http://marc.info/?l=git&m=146330914118766&w=2 > I reviewed the full series. I found a few minor things I would have done differently, but overall I think it looks good. Thanks for the hard work and the time invested here. I remember seeing this on the list quite some time ago, so it's nice to see it finally come together. Thanks, Jake > Changes in this version: > > 1. Rebased on top of master. > > Karthik Nayak (17): > ref-filter: implement %(if), %(then), and %(else) atoms > ref-filter: include reference to 'used_atom' within 'atom_value' > ref-filter: implement %(if:equals=<string>) and > %(if:notequals=<string>) > ref-filter: modify "%(objectname:short)" to take length > ref-filter: move get_head_description() from branch.c > ref-filter: introduce format_ref_array_item() > ref-filter: make %(upstream:track) prints "[gone]" for invalid > upstreams > ref-filter: add support for %(upstream:track,nobracket) > ref-filter: make "%(symref)" atom work with the ':short' modifier > ref-filter: introduce refname_atom_parser_internal() > ref-filter: introduce symref_atom_parser() and refname_atom_parser() > ref-filter: make remote_ref_atom_parser() use > refname_atom_parser_internal() > ref-filter: add `:dir` and `:base` options for ref printing atoms > ref-filter: allow porcelain to translate messages in the output > branch, tag: use porcelain output > branch: use ref-filter printing APIs > branch: implement '--format' option > > Documentation/git-branch.txt | 7 +- > Documentation/git-for-each-ref.txt | 82 ++++++- > builtin/branch.c | 277 +++++++--------------- > builtin/tag.c | 2 + > ref-filter.c | 456 +++++++++++++++++++++++++++++++------ > ref-filter.h | 7 + > t/t3203-branch-output.sh | 16 +- > t/t6040-tracking-info.sh | 2 +- > t/t6300-for-each-ref.sh | 73 +++++- > t/t6302-for-each-ref-filter.sh | 94 ++++++++ > 10 files changed, 725 insertions(+), 291 deletions(-) > > -- > 2.10.2 >