| 15 | #include "wildmatch.h" |
| 16 | |
| 17 | static struct reflog_expire_entry_option *find_cfg_ent(struct reflog_expire_options *opts, |
| 18 | const char *pattern, size_t len) |
| 19 | { |
| 20 | struct reflog_expire_entry_option *ent; |
| 21 | |
| 22 | if (!opts->entries_tail) |
| 23 | opts->entries_tail = &opts->entries; |
| 24 | |
| 25 | for (ent = opts->entries; ent; ent = ent->next) |
| 26 | if (!xstrncmpz(ent->pattern, pattern, len)) |
| 27 | return ent; |
| 28 | |
| 29 | FLEX_ALLOC_MEM(ent, pattern, pattern, len); |
| 30 | *opts->entries_tail = ent; |
| 31 | opts->entries_tail = &(ent->next); |
| 32 | return ent; |
| 33 | } |
| 34 | |
| 35 | int reflog_expire_config(const char *var, const char *value, |
| 36 | const struct config_context *ctx, void *cb) |
no test coverage detected