transport-helper: call do_take_over() in process_connect
commit176cd68634c4641cc45030dc7f287be47d1809d1
authorJiang Xin <zhiyou.jx@alibaba-inc.com>
Sun, 21 Jan 2024 13:15:38 +0000 (21 21:15 +0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Jan 2024 15:54:38 +0000 (22 07:54 -0800)
tree9ec852b0096ad20f1cc097ae4698827373a23dd1
parent35d26e79f8d8c030269a198d07de939bd3f5ea08
transport-helper: call do_take_over() in process_connect

The existing pattern among all callers of process_connect() seems to be

        if (process_connect(...)) {
                do_take_over();
                ... dispatch to the underlying method ...
        }
        ... otherwise implement the fallback ...

where the return value from process_connect() is the return value of the
call it makes to process_connect_service().

Move the call of do_take_over() inside process_connect(), so that
calling the process_connect() function is more concise and will not
miss do_take_over().

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
transport-helper.c