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

Function same_token

trailer.c:108–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108static int same_token(struct trailer_item *a, struct arg_item *b)
109{
110 size_t a_len, b_len, min_len;
111
112 if (!a->token)
113 return 0;
114
115 a_len = token_len_without_separator(a->token, strlen(a->token));
116 b_len = token_len_without_separator(b->token, strlen(b->token));
117 min_len = (a_len > b_len) ? b_len : a_len;
118
119 return !strncasecmp(a->token, b->token, min_len);
120}
121
122static int same_value(struct trailer_item *a, struct arg_item *b)
123{

Callers 2

same_trailerFunction · 0.85
find_same_and_apply_argFunction · 0.85

Calls 1

Tested by

no test coverage detected