diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-11-10 06:48:55 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-12 14:50:05 +0900 |
commit | 6c6d5d0776b5eb60dc206691fc1fde755e94da20 (patch) | |
tree | d004a57dadff0d37a6a4c9ca8c7cbc62f41a0394 /transport.c | |
parent | notes-merge.c: remove implicit dependency the_repository (diff) | |
download | tgif-6c6d5d0776b5eb60dc206691fc1fde755e94da20.tar.xz |
transport.c: remove implicit dependency on the_index
note, there's still another hidden dependency related to this: even
though we pass a repo to transport_push() we still use
is_bare_repository() which pretty much assumes the_repository (and
some other global state).
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r-- | transport.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/transport.c b/transport.c index 5a74b609ff..71f663743f 100644 --- a/transport.c +++ b/transport.c @@ -1105,7 +1105,8 @@ static int run_pre_push_hook(struct transport *transport, return ret; } -int transport_push(struct transport *transport, +int transport_push(struct repository *r, + struct transport *transport, struct refspec *rs, int flags, unsigned int *reject_reasons) { @@ -1172,7 +1173,7 @@ int transport_push(struct transport *transport, oid_array_append(&commits, &ref->new_oid); - if (!push_unpushed_submodules(the_repository, + if (!push_unpushed_submodules(r, &commits, transport->remote, rs, @@ -1197,7 +1198,7 @@ int transport_push(struct transport *transport, oid_array_append(&commits, &ref->new_oid); - if (find_unpushed_submodules(the_repository, + if (find_unpushed_submodules(r, &commits, transport->remote->name, &needs_pushing)) { |