MCPcopy Create free account
hub / github.com/git/git / find_cfg_ent

Function find_cfg_ent

reflog.c:17–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15#include "wildmatch.h"
16
17static 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
35int reflog_expire_config(const char *var, const char *value,
36 const struct config_context *ctx, void *cb)

Callers 1

reflog_expire_configFunction · 0.85

Calls 1

xstrncmpzFunction · 0.85

Tested by

no test coverage detected