Subject: Re: [PATCH 04/12] remote.c: provide per-branch pushremote name

From: Jeff King <[email-masked]>
Date: Tue, 5 May 2015 15:33:39 -0400

On Sun, May 03, 2015 at 12:51:13AM -0400, Eric Sunshine wrote:

> > Versus v1, I did something a little clever by passing a function pointer
> > around (versus a flag and letting the caller do a conditional based on
> > the flag). Too clever?
> 
> FWIW: I found this "clever" version easy enough to follow.
> 
> However, if you push a tiny bit of the work into the callers of
> remote_get_1(), then you can do away with the "cleverness" altogether,
> can't you? Something like this:

Yeah, it's just that it goes in the opposite direction I was trying for,
which is to have as little code as possible in the wrapper functions (in
fact, I think after my changes you could even bump the read_config()
call into remote_get_1; before my changes, it depended on the pushremote
config being set before the call).

I agree it is not so much code, though, and maybe it makes the flow a
little clearer. I'll play with it for the re-roll.

-Peff