[PATCH 0/2] Move push logic to transport.c

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

 



Currently, send_pack() does the work of figuring out what the refspecs 
mean before pushing (with the help of functions from remote.c), updating 
local state afterwards, and reporting what it did.

Transports other than the native protocol use the same logic for the first 
of these, and don't do the other two at all. In order to be able to share 
more code and make it easier to be consist, move the logic to 
transport_push. This is also more similar to how fetch is organized, 
although fetch puts most of the logic in builtin-fetch, which isn't really 
feasible until all of the transports are converted to the new functions, 
and may be less convenient anyway.

This series only goes as far as adding a new "push_refs" method to struct 
transport and using it for the git native transport. It doesn't convert 
http-push or the rsync transports, largely because I don't have test 
setups for rsync or webdav to make sure that they're still working.

It also leaves copies of matching, updating, and reporting code in 
builtin-send-pack, but these are only used for "git send-pack", and are 
not used in the code paths for "git push". Hopefully, we can deprecate the 
protocol-specific command at some point in favor of just using "git push".

This is on top of next for Jay's patch to make get_local_heads() common.

Daniel Barkalow (2):
  Use a common function to get the pretty name of refs
  Move push matching and reporting logic into transport.c

 builtin-fetch.c     |    6 +-
 builtin-send-pack.c |  153 +++++++++++++--------------
 refs.c              |   10 ++
 refs.h              |    2 +
 send-pack.h         |    6 +-
 transport.c         |  283 +++++++++++++++++++++++++++++++++++++++++++++++----
 transport.h         |    3 +-
 7 files changed, 356 insertions(+), 107 deletions(-)
--
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]

  Powered by Linux