rename git_config_from_buf to git_config_from_mem

This matches the naming used in the index_{fd,mem,...} functions. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Lars Schneider committed Feb 19, 2016 at 10:16 UTC 7454ee3c623a6788d91fd3c97af134de33996cfa
3 files changed +4 -4
cache.h
+1 -1
@@ -1485,7 +1485,7 @@ struct git_config_source {
1485 typedef int (*config_fn_t)(const char *, const char *, void *);
1486 extern int git_default_config(const char *, const char *, void *);
1487 extern int git_config_from_file(config_fn_t fn, const char *, void *);
1488 -extern int git_config_from_buf(config_fn_t fn, const char *name,
1488 +extern int git_config_from_mem(config_fn_t fn, const char *name,
1489 const char *buf, size_t len, void *data);
1490 extern void git_config_push_parameter(const char *text);
1491 extern int git_config_from_parameters(config_fn_t fn, void *data);
config.c
+2 -2
@@ -1096,7 +1096,7 @@ int git_config_from_file(config_fn_t fn, const char *filename, void *data)
1096 return ret;
1097 }
1098
1099 -int git_config_from_buf(config_fn_t fn, const char *name, const char *buf,
1099 +int git_config_from_mem(config_fn_t fn, const char *name, const char *buf,
1100 size_t len, void *data)
1101 {
1102 struct config_source top;
@@ -1132,7 +1132,7 @@ static int git_config_from_blob_sha1(config_fn_t fn,
1132 return error("reference '%s' does not point to a blob", name);
1133 }
1134
1135 - ret = git_config_from_buf(fn, name, buf, size, data);
1135 + ret = git_config_from_mem(fn, name, buf, size, data);
1136 free(buf);
1137
1138 return ret;
submodule-config.c
+1 -1
@@ -427,7 +427,7 @@ static const struct submodule *config_from(struct submodule_cache *cache,
427 parameter.commit_sha1 = commit_sha1;
428 parameter.gitmodules_sha1 = sha1;
429 parameter.overwrite = 0;
430 - git_config_from_buf(parse_config, rev.buf, config, config_size,
430 + git_config_from_mem(parse_config, rev.buf, config, config_size,
431 &parameter);
432 free(config);
433