Skip to content

Commit 26f7b5c

Browse files
committed
Merge branch 'kn/ref-filter-atom-parsing'
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
2 parents ae2f255 + fe63c4d commit 26f7b5c

File tree

3 files changed

+304
-192
lines changed

3 files changed

+304
-192
lines changed

Documentation/git-for-each-ref.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,18 @@ color::
133133

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

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

0 commit comments

Comments
 (0)