This series ports over branch.c to use ref-filter APIs
This is the last part of unification of 'git branch -l', 'git tag -l'
and 'git for-each-ref'.

There are a few topics worth discussing here :

1. [7/9] This ensures that when we use the "%(upstream:track)" atom we
print "[gone]" for upstreams which are invalid. We either implement
this and try to mimic what branch.c does when we use the verbose
option or we can drop this in branch.c.

2. [8/9] The usage of get_format() function in branch.c which provides
us the needed format for printing. This seems overly complex to the
uninitiated as it uses a complex atom combinations to mimic the
existing branch printing format.

Karthik Nayak (9):
  ref-filter: implement %(if), %(then), and %(else) atoms
  ref-filter: implement %(if:equals=<string>) and
    %(if:notequals=<string>)
  ref-filter: add support for %(path) atom
  ref-filter: modify "%(objectname:short)" to take length
  ref-filter: adopt get_head_description() from branch.c
  ref-filter: introduce format_ref_array_item()
  ref-filter: make %(upstream:track) prints "[gone]" for invalid
    upstreams
  branch: use ref-filter printing APIs
  branch: implement '--format' option

 Documentation/git-branch.txt       |   7 +-
 Documentation/git-for-each-ref.txt |  32 ++++-
 builtin/branch.c                   | 262 ++++++++++---------------------------
 ref-filter.c                       | 250 +++++++++++++++++++++++++++++++----
 ref-filter.h                       |   3 +
 t/t3203-branch-output.sh           |  11 ++
 t/t6040-tracking-info.sh           |  12 +-
 t/t6300-for-each-ref.sh            |  24 +++-
 t/t6302-for-each-ref-filter.sh     | 105 +++++++++++++++
 9 files changed, 480 insertions(+), 226 deletions(-)

-- 
2.6.0

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to