1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-10 09:56:10 +02:00

Merge branch 'rs/fetch-simplify-with-starts-with'

Code simplification.

* rs/fetch-simplify-with-starts-with:
  fetch: convert strncmp() with strlen() to starts_with()
This commit is contained in:
Junio C Hamano 2024-03-05 09:44:42 -08:00
commit 6f74483667

View File

@ -448,9 +448,8 @@ static void filter_prefetch_refspec(struct refspec *rs)
continue;
if (!rs->items[i].dst ||
(rs->items[i].src &&
!strncmp(rs->items[i].src,
ref_namespace[NAMESPACE_TAGS].ref,
strlen(ref_namespace[NAMESPACE_TAGS].ref)))) {
starts_with(rs->items[i].src,
ref_namespace[NAMESPACE_TAGS].ref))) {
int j;
free(rs->items[i].src);