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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]