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

Function read_mailmap_blob

mailmap.c:184–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184int read_mailmap_blob(struct repository *repo, struct string_list *map,
185 const char *name)
186{
187 struct object_id oid;
188 char *buf;
189 size_t size;
190 enum object_type type;
191
192 if (!name)
193 return 0;
194 if (repo_get_oid(repo, name, &oid) < 0)
195 return 0;
196
197 buf = odb_read_object(repo->objects, &oid, &type, &size);
198 if (!buf)
199 return error("unable to read mailmap object at %s", name);
200 if (type != OBJ_BLOB) {
201 free(buf);
202 return error("mailmap is not a blob: %s", name);
203 }
204
205 read_mailmap_string(map, buf);
206
207 free(buf);
208 return 0;
209}
210
211int read_mailmap(struct repository *repo, struct string_list *map)
212{

Callers 2

read_mailmapFunction · 0.85
cmd_check_mailmapFunction · 0.85

Calls 4

repo_get_oidFunction · 0.85
odb_read_objectFunction · 0.85
errorFunction · 0.85
read_mailmap_stringFunction · 0.85

Tested by

no test coverage detected