]> git.ipfire.org Git - thirdparty/git.git/commit
connect: rename enum protocol to url_scheme
authorMatheus Afonso Martins Moreira <matheus@matheusmoreira.com>
Sat, 2 May 2026 05:28:35 +0000 (05:28 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 May 2026 00:48:26 +0000 (09:48 +0900)
commita8f96968a96d5b0a90118402e81742d26c8347cb
treec3b5df9047cedd47b7f72c599f482e4271aa9de7
parent94f057755b7941b321fd11fec1b2e3ca5313a4e0
connect: rename enum protocol to url_scheme

RFC 1738 names the part of a URL before the colon a "scheme".
connect.c calls it "protocol", which is more generic
and collides with the unrelated enum protocol_version.

Rename:

    enum protocol -> enum url_scheme
    PROTO_*       -> URL_SCHEME_*
    prot_name     -> url_scheme_name
    get_protocol  -> url_get_scheme

The local variables in parse_connect_url and git_connect
are renamed accordingly, from protocol to scheme.

No behavior change. The user-visible diagnostics
and translated error messages are preserved:

    "Diag: protocol=..."
    "protocol '%s' is not supported"
    "unknown protocol"

This rename also prepares for moving the scheme-detection functions
to a shared header so that a future plumbing command can parse URLs
using the same logic as the connect path.

Suggested-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
connect.c