remove double slashes to make --index work with such filenames */
| 446 | |
| 447 | /* remove double slashes to make --index work with such filenames */ |
| 448 | static char *squash_slash(char *name) |
| 449 | { |
| 450 | int i = 0, j = 0; |
| 451 | |
| 452 | if (!name) |
| 453 | return NULL; |
| 454 | |
| 455 | while (name[i]) { |
| 456 | if ((name[j++] = name[i++]) == '/') |
| 457 | while (name[i] == '/') |
| 458 | i++; |
| 459 | } |
| 460 | name[j] = '\0'; |
| 461 | return name; |
| 462 | } |
| 463 | |
| 464 | static char *find_name_gnu(struct strbuf *root, |
| 465 | const char *line, |
no outgoing calls
no test coverage detected