diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-05-16 23:10:58 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-05-17 01:02:09 +0300 |
commit | 86f4e31298e4440a08da277966a52adeb982a1fb (patch) | |
tree | e4dd9d05d530deb5da7db165f069052008ffde90 /submodule-config.c | |
parent | 6cd33dceed60949e2dbc32e3f0f5e67c4c882e1e (diff) |
connect.c: refactor sending of agent & object-format
Refactor the sending of the "agent" and "object-format" capabilities
into a function.
This was added in its current form in ab67235bc4 (connect: parse v2
refs with correct hash algorithm, 2020-05-25). When we connect to a v2
server we need to know about its object-format, and it needs to know
about ours. Since most things in connect.c and transport.c piggy-back
on the eager getting of remote refs via the handshake() those commands
can make use of the just-sent-over object-format by ls-refs.
But I'm about to add a command that may come after ls-refs, and may
not, but we need the server to know about our user-agent and
object-format. So let's split this into a function.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule-config.c')
0 files changed, 0 insertions, 0 deletions