Re: [PATCH 2/3] cmd_push: pass "flags" pointer to config callback

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

 



On Sun, Feb 15, 2015 at 11:05:57PM -0800, Junio C Hamano wrote:

> Jeff King <peff@xxxxxxxx> writes:
> 
> > This will let us manipulate any transport flags which have matching
> > config options (there are none yet, but we will add one in
> > the next patch).
> 
> Nice---this will later lets us do push.atomic if we really wanted
> to, right?

Yes, exactly. Or push.signed, or whatever.

> > To be honest, the whole do_push is confusing to me. It seems like that
> > should just be part of cmd_push.
> 
> Yeah, that part of the push callchain always confuses me every time
> I look at it.  I think it was a consequence of how transport layer
> was wedged into the existing codepath that only handled push that
> called send-pack to unify the codepaths that push calls into
> different transport backends, and we may have done it differently
> and more cleanly if we were designing the push to transport to
> backends from scratch.

I took a very cursory look at folding do_push into cmd_push. It's not
_too_ bad. You wouldn't want to fold push_with_options in, as that gets
called from a loop (you could make it the loop body, but I think it is
more clear as-is).

However, it is really do_push which continues to manipulate the flags
and set up the push, so that is the bit that should be folded in. And
then it would be fine to make transport_flags a global, and
push_with_options could just use it directly, I think.

-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]