From: Eric Sunshine Date: Tue, 04 Jun 2013 21:12:10 GMT Subject: Re: [PATCH 08/15] for-each-ref: get --pretty using format_commit_message Message-ID: In-Reply-To: <1370349337-20938-9-git-send-email-artagnon@gmail.com> On Tue, Jun 4, 2013 at 8:35 AM, Ramkumar Ramachandra wrote: > From: Nguyễn Thái Ngọc Duy > > [rr: documentation] > > Signed-off-by: Ramkumar Ramachandra > --- > Documentation/git-for-each-ref.txt | 22 ++++++++++++- > builtin/for-each-ref.c | 67 ++++++++++++++++++++++++++++++++++++-- > 2 files changed, 85 insertions(+), 4 deletions(-) > > diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt > index f2e08d1..6135812 100644 > --- a/Documentation/git-for-each-ref.txt > +++ b/Documentation/git-for-each-ref.txt > @@ -47,6 +48,25 @@ OPTIONS > `xx`; for example `%00` interpolates to `\0` (NUL), > `%09` to `\t` (TAB) and `%0a` to `\n` (LF). > > +:: > + A format string with supporting placeholders described in the > + "PRETTY FORMATS" section in linkgit:git-log[1]. Additionally > + supports placeholders from `` > + (i.e. `%[*](fieldname)`). > ++ > +Caveats: > + > +1. Many of the placeholders in "PRETTY FORMATS" are designed to work > + specifically on commit objects: when non-commit objects are > + supplied, those placeholders won't work. Should "won't work" be expanded upon? It's not clear if this means that git will outright crash, or if it will abort with an appropriate error message, or if the directive will be displayed as-is or removed from the output. > +2. Does not interpolate `%ab` (where `ab` are hex digits) with the > + corresponding hex code. To print a byte from a hex code, use > + `%xab` (from pretty-formats) instead. > + > +3. Only the placeholders inherited from `` will respect > + quoting settings. > + > ...:: > If one or more patterns are given, only refs are shown that > match against at least one pattern, either using fnmatch(3) or