| 72 | } |
| 73 | |
| 74 | static void submodules_absorb_gitdir_if_needed(void) |
| 75 | { |
| 76 | int i; |
| 77 | for (i = 0; i < list.nr; i++) { |
| 78 | const char *name = list.entry[i].name; |
| 79 | int pos; |
| 80 | const struct cache_entry *ce; |
| 81 | |
| 82 | pos = index_name_pos(the_repository->index, name, strlen(name)); |
| 83 | if (pos < 0) { |
| 84 | pos = get_ours_cache_pos(name, -pos - 1); |
| 85 | if (pos < 0) |
| 86 | continue; |
| 87 | } |
| 88 | ce = the_repository->index->cache[pos]; |
| 89 | |
| 90 | if (!S_ISGITLINK(ce->ce_mode) || |
| 91 | !file_exists(ce->name) || |
| 92 | is_empty_dir(name)) |
| 93 | continue; |
| 94 | |
| 95 | if (!submodule_uses_gitfile(name)) |
| 96 | absorb_git_dir_into_superproject(name, NULL); |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | static int check_local_mod(struct object_id *head, int index_only) |
| 101 | { |
no test coverage detected