fetch: convert strncmp() with strlen() to starts_with()
commit87bd7fbb9c3e165a68046e04bf12f5a76cae2965
authorRené Scharfe <l.s.r@web.de>
Sat, 24 Feb 2024 21:47:06 +0000 (24 22:47 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Feb 2024 16:58:45 +0000 (26 08:58 -0800)
tree4ab413c3d9c3a1bf7cb12b1b1784697dfa253141
parent3c2a3fdc388747b9eaf4a4a4f2035c1c9ddb26d0
fetch: convert strncmp() with strlen() to starts_with()

Using strncmp() and strlen() to check whether a string starts with
another one requires repeating the prefix candidate.  Use starts_with()
instead, which reduces repetition and is more readable.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c