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

Function tmp_objdir_destroy

tmp-objdir.c:55–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55int tmp_objdir_destroy(struct tmp_objdir *t)
56{
57 int err;
58
59 if (!t)
60 return 0;
61
62 if (t == the_tmp_objdir)
63 the_tmp_objdir = NULL;
64
65 if (t->prev_source)
66 odb_restore_primary_source(t->repo->objects, t->prev_source, t->path.buf);
67
68 err = remove_dir_recursively(&t->path, 0);
69
70 chdir_notify_unregister(NULL, tmp_objdir_reparent, t);
71 tmp_objdir_free(t);
72
73 return err;
74}
75
76static void remove_tmp_objdir(void)
77{

Callers 4

remove_tmp_objdirFunction · 0.85
tmp_objdir_createFunction · 0.85
tmp_objdir_migrateFunction · 0.85
diff_result_codeFunction · 0.85

Calls 4

remove_dir_recursivelyFunction · 0.85
chdir_notify_unregisterFunction · 0.85
tmp_objdir_freeFunction · 0.85

Tested by

no test coverage detected