remote: rename query_refspecs functions

Rename functions related to handling refspecs in preparation for their
move from `remote.c` to `refspec.c`. Update their names to better
reflect their intent:

    - `query_refspecs()` -> `refspec_find_match()` for clarity, as it
      finds a single matching refspec.

    - `query_refspecs_multiple()` -> `refspec_find_all_matches()` to
      better reflect that it collects all matching refspecs instead of
      returning just the first match.

    - `query_matches_negative_refspec()` ->
      `refspec_find_negative_match()` for consistency with the
      updated naming convention, even though this static function
      didn't strictly require renaming.

Signed-off-by: Meet Soni <meetsoni3017@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Meet Soni
2025-02-04 09:35:56 +05:30
committed by Junio C Hamano
parent 230d022fe3
commit be0905fed1
3 changed files with 12 additions and 12 deletions

View File

@ -269,7 +269,7 @@ int refname_matches_negative_refspec_item(const char *refname, struct refspec *r
*/
struct ref *apply_negative_refspecs(struct ref *ref_map, struct refspec *rs);
int query_refspecs(struct refspec *rs, struct refspec_item *query);
int refspec_find_match(struct refspec *rs, struct refspec_item *query);
char *apply_refspecs(struct refspec *rs, const char *name);
int check_push_refs(struct ref *src, struct refspec *rs);