]> git.ipfire.org Git - thirdparty/git.git/blobdiff - urlmatch.h
blame.c: replace instance of !oidcmp for oideq
[thirdparty/git.git] / urlmatch.h
index e482148248d2dac64656bd9a66af0bd6224ea929..2407520731f9f0c5250d7bdf5833c56320c10160 100644 (file)
@@ -33,7 +33,7 @@ struct url_info {
                                 * '?...' and '#...' portion; will always be >= 1 */
 };
 
-extern char *url_normalize(const char *, struct url_info *);
+char *url_normalize(const char *, struct url_info *);
 
 struct urlmatch_item {
        size_t hostmatch_len;
@@ -50,8 +50,17 @@ struct urlmatch_config {
        void *cb;
        int (*collect_fn)(const char *var, const char *value, void *cb);
        int (*cascade_fn)(const char *var, const char *value, void *cb);
+       /*
+        * Compare the two matches, the one just discovered and the existing
+        * best match and return a negative value if the found item is to be
+        * rejected or a non-negative value if it is to be accepted.  If this
+        * field is set to NULL, use the default comparison technique, which
+        * checks to ses if found is better (according to the urlmatch
+        * specificity rules) than existing.
+        */
+       int (*select_fn)(const struct urlmatch_item *found, const struct urlmatch_item *existing);
 };
 
-extern int urlmatch_config_entry(const char *var, const char *value, void *cb);
+int urlmatch_config_entry(const char *var, const char *value, void *cb);
 
 #endif /* URL_MATCH_H */