Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-01-18 01:49:27 +0300
committerJunio C Hamano <gitster@pobox.com>2017-01-18 01:49:27 +0300
commit3075e40c75560d93b569d1bba715008ca734ad83 (patch)
treed23ecc348dde5dabd0ad8929fc84aab5e9fcd881 /transport.c
parent9da9965ba6672dc0016a5ac694271bbdd4589e15 (diff)
parent0301c821c5cd124733accfbff0ddbf7f0b0ee9fb (diff)
Merge branch 'bw/push-dry-run' into maint
"git push --dry-run --recurse-submodule=on-demand" wasn't "--dry-run" in the submodules. * bw/push-dry-run: push: fix --dry-run to not push submodules push: --dry-run updates submodules when --recurse-submodules=on-demand
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/transport.c b/transport.c
index f482869057..04e5d6623e 100644
--- a/transport.c
+++ b/transport.c
@@ -955,15 +955,18 @@ int transport_push(struct transport *transport,
if (!is_null_oid(&ref->new_oid))
sha1_array_append(&commits, ref->new_oid.hash);
- if (!push_unpushed_submodules(&commits, transport->remote->name)) {
+ if (!push_unpushed_submodules(&commits,
+ transport->remote->name,
+ pretend)) {
sha1_array_clear(&commits);
die("Failed to push all needed submodules!");
}
sha1_array_clear(&commits);
}
- if ((flags & (TRANSPORT_RECURSE_SUBMODULES_ON_DEMAND |
- TRANSPORT_RECURSE_SUBMODULES_CHECK)) && !is_bare_repository()) {
+ if (((flags & TRANSPORT_RECURSE_SUBMODULES_CHECK) ||
+ ((flags & TRANSPORT_RECURSE_SUBMODULES_ON_DEMAND) &&
+ !pretend)) && !is_bare_repository()) {
struct ref *ref = remote_refs;
struct string_list needs_pushing = STRING_LIST_INIT_DUP;
struct sha1_array commits = SHA1_ARRAY_INIT;