Merge branch 'ms/refspec-cleanup'

Code clean-up.  cf. <Z6G-toOJjMmK8iJG@pks.im>

* ms/refspec-cleanup:
  refspec: relocate apply_refspecs and related funtions
  refspec: relocate matching related functions
  remote: rename query_refspecs functions
  refspec: relocate refname_matches_negative_refspec_item
  remote: rename function omit_name_by_refspec
This commit is contained in:
Junio C Hamano
2025-02-12 10:08:54 -08:00
6 changed files with 244 additions and 220 deletions

View File

@@ -263,21 +263,6 @@ int resolve_remote_symref(struct ref *ref, struct ref *list);
*/
struct ref *ref_remove_duplicates(struct ref *ref_map);
/*
* Check whether a name matches any negative refspec in rs. Returns 1 if the
* name matches at least one negative refspec, and 0 otherwise.
*/
int omit_name_by_refspec(const char *name, struct refspec *rs);
/*
* Remove all entries in the input list which match any negative refspec in
* the refspec list.
*/
struct ref *apply_negative_refspecs(struct ref *ref_map, struct refspec *rs);
int query_refspecs(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);
int match_push_refs(struct ref *src, struct ref **dst,
struct refspec *rs, int flags);