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

Function parse_from_existing

builtin/fast-import.c:2628–2644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2626}
2627
2628static void parse_from_existing(struct branch *b)
2629{
2630 if (is_null_oid(&b->oid)) {
2631 oidclr(&b->branch_tree.versions[0].oid, the_repository->hash_algo);
2632 oidclr(&b->branch_tree.versions[1].oid, the_repository->hash_algo);
2633 } else {
2634 unsigned long size;
2635 size_t size_st = 0;
2636 char *buf;
2637
2638 buf = odb_read_object_peeled(the_repository->objects, &b->oid,
2639 OBJ_COMMIT, &size_st, &b->oid);
2640 size = cast_size_t_to_ulong(size_st);
2641 parse_from_commit(b, buf, size);
2642 free(buf);
2643 }
2644}
2645
2646static int parse_objectish(struct branch *b, const char *objectish)
2647{

Callers 1

parse_objectishFunction · 0.85

Calls 5

is_null_oidFunction · 0.85
oidclrFunction · 0.85
odb_read_object_peeledFunction · 0.85
cast_size_t_to_ulongFunction · 0.85
parse_from_commitFunction · 0.85

Tested by

no test coverage detected