Skip to content

Commit

Permalink
Merge branch 'kn/ref-filter-atom-parsing'
Browse files Browse the repository at this point in the history
The ref-filter's format-parsing code has been refactored, in
preparation for "branch --format" and friends.

* kn/ref-filter-atom-parsing:
  ref-filter: introduce objectname_atom_parser()
  ref-filter: introduce contents_atom_parser()
  ref-filter: introduce remote_ref_atom_parser()
  ref-filter: align: introduce long-form syntax
  ref-filter: introduce align_atom_parser()
  ref-filter: introduce parse_align_position()
  ref-filter: introduce color_atom_parser()
  ref-filter: introduce parsing functions for each valid atom
  ref-filter: introduce struct used_atom
  ref-filter: bump 'used_atom' and related code to the top
  ref-filter: use string_list_split over strbuf_split
  • Loading branch information
Junio C Hamano committed Feb 26, 2016
2 parents ae2f255 + fe63c4d commit 26f7b5c
Show file tree
Hide file tree
Showing 3 changed files with 304 additions and 192 deletions.
20 changes: 12 additions & 8 deletions Documentation/git-for-each-ref.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,18 @@ color::

align::
Left-, middle-, or right-align the content between
%(align:...) and %(end). The "align:" is followed by `<width>`
and `<position>` in any order separated by a comma, where the
`<position>` is either left, right or middle, default being
left and `<width>` is the total length of the content with
alignment. If the contents length is more than the width then
no alignment is performed. If used with '--quote' everything
in between %(align:...) and %(end) is quoted, but if nested
then only the topmost level performs quoting.
%(align:...) and %(end). The "align:" is followed by
`width=<width>` and `position=<position>` in any order
separated by a comma, where the `<position>` is either left,
right or middle, default being left and `<width>` is the total
length of the content with alignment. For brevity, the
"width=" and/or "position=" prefixes may be omitted, and bare
<width> and <position> used instead. For instance,
`%(align:<width>,<position>)`. If the contents length is more
than the width then no alignment is performed. If used with
'--quote' everything in between %(align:...) and %(end) is
quoted, but if nested then only the topmost level performs
quoting.

In addition to the above, for commit and tag objects, the header
field names (`tree`, `parent`, `object`, `type`, and `tag`) can
Expand Down
Loading

0 comments on commit 26f7b5c

Please sign in to comment.