From 06bf4ad1db92c32af38e16d9b7f928edbd647780 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Wed, 5 Apr 2017 10:47:19 -0700 Subject: push: propagate remote and refspec with --recurse-submodules Teach "push --recurse-submodules" to propagate, if given a name as remote, the provided remote and refspec recursively to the pushes performed in the submodules. The push will therefore only succeed if all submodules have a remote with such a name configured. Note that "push --recurse-submodules" with a path or URL as remote will not propagate the remote or refspec and instead use the default remote and refspec configured in the submodule, preserving the current behavior. Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- transport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'transport.c') diff --git a/transport.c b/transport.c index 64e60b635..a62e5118c 100644 --- a/transport.c +++ b/transport.c @@ -1030,7 +1030,8 @@ int transport_push(struct transport *transport, sha1_array_append(&commits, ref->new_oid.hash); if (!push_unpushed_submodules(&commits, - transport->remote->name, + transport->remote, + refspec, refspec_nr, transport->push_options, pretend)) { sha1_array_clear(&commits); -- cgit v1.2.1