| 232 | enum finalize_object_file_flags flags); |
| 233 | |
| 234 | static int migrate_one(struct tmp_objdir *t, |
| 235 | struct strbuf *src, struct strbuf *dst, |
| 236 | enum finalize_object_file_flags flags) |
| 237 | { |
| 238 | struct stat st; |
| 239 | |
| 240 | if (stat(src->buf, &st) < 0) |
| 241 | return -1; |
| 242 | if (S_ISDIR(st.st_mode)) { |
| 243 | if (!mkdir(dst->buf, 0777)) { |
| 244 | if (adjust_shared_perm(t->repo, dst->buf)) |
| 245 | return -1; |
| 246 | } else if (errno != EEXIST) |
| 247 | return -1; |
| 248 | return migrate_paths(t, src, dst, flags); |
| 249 | } |
| 250 | return finalize_object_file_flags(t->repo, src->buf, dst->buf, flags); |
| 251 | } |
| 252 | |
| 253 | static int is_loose_object_shard(const char *name) |
| 254 | { |
no test coverage detected