X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=transport.c;h=98c577804f177b1c6f9df0e34e5fc3a656a81d27;hb=afb6b561e3dad13df5d9df9731751a3d310c0854;hp=c9c8056f9de69bd378cd271d70363b5560f13e07;hpb=4ed54610e5ca8fdc34dcf8729f6416599d1bc39e;p=git.git diff --git a/transport.c b/transport.c index c9c8056f9..e1940615e 100644 --- a/transport.c +++ b/transport.c @@ -10,6 +10,7 @@ #include "refs.h" #include "branch.h" #include "url.h" +#include "submodule.h" /* rsync support */ @@ -431,7 +432,8 @@ static int fetch_refs_from_bundle(struct transport *transport, int nr_heads, struct ref **to_fetch) { struct bundle_transport_data *data = transport->data; - return unbundle(&data->header, data->fd); + return unbundle(&data->header, data->fd, + transport->progress ? BUNDLE_VERBOSE : 0); } static int close_bundle(struct transport *transport) @@ -1041,6 +1043,14 @@ int transport_push(struct transport *transport, flags & TRANSPORT_PUSH_MIRROR, flags & TRANSPORT_PUSH_FORCE); + if ((flags & TRANSPORT_RECURSE_SUBMODULES_CHECK) && !is_bare_repository()) { + struct ref *ref = remote_refs; + for (; ref; ref = ref->next) + if (!is_null_sha1(ref->new_sha1) && + check_submodule_needs_pushing(ref->new_sha1,transport->remote->name)) + die("There are unpushed submodules, aborting."); + } + push_ret = transport->push_refs(transport, remote_refs, flags); err = push_had_errors(remote_refs); ret = push_ret | err;