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

Function check_if_different

trailer.c:195–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195static int check_if_different(struct trailer_item *in_tok,
196 struct arg_item *arg_tok,
197 int check_all,
198 struct list_head *head)
199{
200 enum trailer_where where = arg_tok->conf.where;
201 struct list_head *next_head;
202 do {
203 if (same_trailer(in_tok, arg_tok))
204 return 0;
205 /*
206 * if we want to add a trailer after another one,
207 * we have to check those before this one
208 */
209 next_head = after_or_end(where) ? in_tok->list.prev
210 : in_tok->list.next;
211 if (next_head == head)
212 break;
213 in_tok = list_entry(next_head, struct trailer_item, list);
214 } while (check_all);
215 return 1;
216}
217
218static char *apply_command(struct conf_info *conf, const char *arg)
219{

Callers 1

apply_arg_if_existsFunction · 0.85

Calls 2

same_trailerFunction · 0.85
after_or_endFunction · 0.85

Tested by

no test coverage detected