MCPcopy Create free account
hub / github.com/git/git / odb_restore_primary_source

Function odb_restore_primary_source

odb.c:256–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256void odb_restore_primary_source(struct object_database *odb,
257 struct odb_source *restore_source,
258 const char *old_path)
259{
260 struct odb_source *cur_source = odb->sources;
261
262 if (strcmp(old_path, cur_source->path))
263 BUG("expected %s as primary object store; found %s",
264 old_path, cur_source->path);
265
266 if (cur_source->next != restore_source)
267 BUG("we expect the old primary object store to be the first alternate");
268
269 odb->repo->disable_ref_updates = false;
270 odb->sources = restore_source;
271 odb_source_free(cur_source);
272}
273
274char *compute_alternate_path(const char *path, struct strbuf *err)
275{

Callers 2

tmp_objdir_destroyFunction · 0.85
tmp_objdir_migrateFunction · 0.85

Calls 1

odb_source_freeFunction · 0.85

Tested by

no test coverage detected