Re: [PATCH 3/3] diffcore-pickaxe: unify setup and teardown code between log -S/-G
- From
Jeff King <peff@peff.net>
- Date
- Apr 5, 2013, 05:45 UTC
- Message-ID
- <20130405054524.GB12705@sigill.intra.peff.net>
- In-Reply-To
- <7vk3ohedn1.fsf@alter.siamese.dyndns.org>
On Thu, Apr 04, 2013 at 10:43:14PM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> Jeff King <peff@peff.net> writes: > > > I notice that you are stuck factoring out not just the setup, but also > > the cleanup, and I wondered if things could be made even simpler by just > > encapsulating the checking logic in a callback; then the setup and > > cleanup flow more naturally, as they are in a single function wrapper. > > > > Like this, which ends up saving 20 lines rather than adding 7: > > Oh, this is one of those many times I am reminded why I love having > you in the reviewer/contributor pool ;-)
I didn't actually test that patch beyond compilation (but it's _obviously_ correct, right?), and I'm about to go to bed. Do you want to take care of adapting your commit message to it?
-Peff