Re: [PATCH v3.1 3/5] Introduce new pretty formats %g[sdD] for reflog information
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Oct 17, 2009, 15:06 UTC
- Message-ID
- <m3y6nadpu2.fsf@localhost.localdomain>
- In-Reply-To
- <e0ab6923eb4057bcbc8e97980dad5e4a37e53067.1255790816.git.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
Show 5 quoted lines
> Note that the --format="%h %gD: %gs" tests may not work in real > repositories, as the --pretty formatter doesn't know to leave away the > ": " on the last commit in an incomplete (because git-gc removed the > old part) reflog. This equivalence is nevertheless the main goal of > this patch.
Perhaps just-introduced grouping syntax would help there? You could for example write
--format="%h%[all() %gD: %gs%]"
which would expand nested group if _all_ placeholders within it have expansion. Perhaps %[ ... %], or %[? ... %], or %[* ... %] could be shorter versions...
-- Jakub Narebski Poland ShadeHawk on #git