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

Function open_fetch_head

builtin/fetch.c:1129–1143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1127};
1128
1129static int open_fetch_head(struct fetch_head *fetch_head)
1130{
1131 const char *filename = git_path_fetch_head(the_repository);
1132
1133 if (write_fetch_head) {
1134 fetch_head->fp = fopen(filename, "a");
1135 if (!fetch_head->fp)
1136 return error_errno(_("cannot open '%s'"), filename);
1137 strbuf_init(&fetch_head->buf, 0);
1138 } else {
1139 fetch_head->fp = NULL;
1140 }
1141
1142 return 0;
1143}
1144
1145static void append_fetch_head(struct fetch_head *fetch_head,
1146 const struct object_id *old_oid,

Callers 1

do_fetchFunction · 0.85

Calls 2

error_errnoFunction · 0.85
strbuf_initFunction · 0.85

Tested by

no test coverage detected