]> git.ipfire.org Git - thirdparty/git.git/commit
promisor-remote: use string constants for 'name' and 'url' too
authorChristian Couder <christian.couder@gmail.com>
Mon, 8 Sep 2025 05:30:49 +0000 (07:30 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 Sep 2025 17:30:54 +0000 (10:30 -0700)
commit4e2139c9c52766f2853dd42c7ff76eee5ac86449
treee9af3b46023f68049a3e0a2340cd1cb5e66920bc
parent4bf7ae3123b2d2a2b0656af31c16401407664a9f
promisor-remote: use string constants for 'name' and 'url' too

A previous commit started to define `promisor_field_filter` and
`promisor_field_token`, and used them instead of the
"partialCloneFilter" and "token" string literals.

Let's do the same for "name" and "url" to avoid repeating them
several times and for consistency with the other fields.

For skipping "name=" or "url=" in advertisements, let's introduce
a skip_field_name_prefix() helper function to keep parsing clean
and easy to understand.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
promisor-remote.c