Re: [PATCH v3 2/5] interpret-trailers: add an option to show only the trailers
- From
Stefan Beller <sbeller@google.com>
- Date
- Aug 10, 2017, 18:28 UTC
- Message-ID
- <CAGZ79kZY1ifks_TAniR+diHOKWVQpRVFeS=XEBGW+7LT=Js5RQ@mail.gmail.com>
- In-Reply-To
- <20170810180404.yg3jdzhquregh4ta@sigill.intra.peff.net>
On Thu, Aug 10, 2017 at 11:04 AM, Jeff King <peff@peff.net> wrote:
Show 11 quoted lines
> In theory it's easy for any reader who wants to parse > trailers to do so. But there are a lot of subtle corner > cases around what counts as a trailer, when the trailer > block begins and ends, etc. Since interpret-trailers already > has our parsing logic, let's let callers ask it to just > output the trailers. > > They still have to parse the "key: value" lines, but at > least they can ignore all of the other corner cases. > > Signed-off-by: Jeff King <peff@peff.net>
Sorry for a sloppy review last round, upon reviewing I found another nit.
> > +test_expect_success 'only trailers' ' > + git config trailer.sign.command "echo config-value" &&
You may want to use 'test_config' here, which keeps the config only for one test. The subsequent tests seem to overwrite the config, so this is not wrong, just not the best style.