serve: provide "receive" function for session-id capability
commitab539c9094e3e3691f157830f74406042d55f774
authorJeff King <peff@peff.net>
Tue, 14 Sep 2021 23:51:30 +0000 (14 19:51 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Sep 2021 00:12:05 +0000 (14 17:12 -0700)
treef9661a2e7f506027b1db554c62b37d7702868bbd
parentc7d3aabd2793ab5772627ff6da95f8f7c28258ab
serve: provide "receive" function for session-id capability

Rather than pulling the session-id string from the list of collected
capabilities, we can handle it as soon as we receive it. This gets us
closer to dropping the collected list entirely.

The behavior should be the same, with one exception. Previously if the
client sent us multiple session-id lines, we'd report only the first.
Now we'll pass each one along to trace2. This shouldn't matter in
practice, since clients shouldn't do that (and if they do, it's probably
sensible to log them all).

As this removes the last caller of the static has_capability(), we can
remove it, as well (and in fact we must to avoid -Wunused-function
complaining).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
serve.c