| 1433 | } |
| 1434 | |
| 1435 | int git_config_from_mem(config_fn_t fn, |
| 1436 | const enum config_origin_type origin_type, |
| 1437 | const char *name, const char *buf, size_t len, |
| 1438 | void *data, enum config_scope scope, |
| 1439 | const struct config_options *opts) |
| 1440 | { |
| 1441 | struct config_source top = CONFIG_SOURCE_INIT; |
| 1442 | |
| 1443 | top.u.buf.buf = buf; |
| 1444 | top.u.buf.len = len; |
| 1445 | top.u.buf.pos = 0; |
| 1446 | top.origin_type = origin_type; |
| 1447 | top.name = name; |
| 1448 | top.default_error_action = CONFIG_ERROR_ERROR; |
| 1449 | top.do_fgetc = config_buf_fgetc; |
| 1450 | top.do_ungetc = config_buf_ungetc; |
| 1451 | top.do_ftell = config_buf_ftell; |
| 1452 | |
| 1453 | return do_config_from(&top, fn, data, scope, opts); |
| 1454 | } |
| 1455 | |
| 1456 | int git_config_from_blob_oid(config_fn_t fn, |
| 1457 | const char *name, |
no test coverage detected