summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-04-05 17:47:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-11 07:45:26 (GMT)
commit06bf4ad1db92c32af38e16d9b7f928edbd647780 (patch)
tree2633f6ac10cfc7ceaa58972990b7d3a82afa5d0d /transport.c
parent93481a6b89be41086997ecaf9454f0c0bf6a961e (diff)
downloadgit-06bf4ad1db92c32af38e16d9b7f928edbd647780.zip
git-06bf4ad1db92c32af38e16d9b7f928edbd647780.tar.gz
git-06bf4ad1db92c32af38e16d9b7f928edbd647780.tar.bz2
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 <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/transport.c b/transport.c
index 64e60b6..a62e511 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);