MCPcopy Index your code
hub / github.com/git/git / migrate_one

Function migrate_one

tmp-objdir.c:234–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232 enum finalize_object_file_flags flags);
233
234static 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
253static int is_loose_object_shard(const char *name)
254{

Callers 1

migrate_pathsFunction · 0.85

Calls 4

adjust_shared_permFunction · 0.85
migrate_pathsFunction · 0.85
statClass · 0.70

Tested by

no test coverage detected