| 556 | } |
| 557 | |
| 558 | static void strbuf_to_cone_pattern(struct strbuf *line, struct pattern_list *pl) |
| 559 | { |
| 560 | strbuf_trim(line); |
| 561 | |
| 562 | strbuf_trim_trailing_dir_sep(line); |
| 563 | |
| 564 | if (strbuf_normalize_path(line)) |
| 565 | die(_("could not normalize path %s"), line->buf); |
| 566 | |
| 567 | if (!line->len) |
| 568 | return; |
| 569 | |
| 570 | if (line->buf[0] != '/') |
| 571 | strbuf_insertstr(line, 0, "/"); |
| 572 | |
| 573 | insert_recursive_pattern(pl, line); |
| 574 | } |
| 575 | |
| 576 | static void add_patterns_from_input(struct pattern_list *pl, |
| 577 | int argc, const char **argv, |
no test coverage detected