Skip to content

Commit

Permalink
rename git_config_from_buf to git_config_from_mem
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lars Schneider authored and Junio C Hamano committed Feb 19, 2016
1 parent a0578e0 commit 7454ee3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,7 @@ struct git_config_source {
typedef int (*config_fn_t)(const char *, const char *, void *);
extern int git_default_config(const char *, const char *, void *);
extern int git_config_from_file(config_fn_t fn, const char *, void *);
extern int git_config_from_buf(config_fn_t fn, const char *name,
extern int git_config_from_mem(config_fn_t fn, const char *name,
const char *buf, size_t len, void *data);
extern void git_config_push_parameter(const char *text);
extern int git_config_from_parameters(config_fn_t fn, void *data);
Expand Down
4 changes: 2 additions & 2 deletions config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ int git_config_from_file(config_fn_t fn, const char *filename, void *data)
return ret;
}

int git_config_from_buf(config_fn_t fn, const char *name, const char *buf,
int git_config_from_mem(config_fn_t fn, const char *name, const char *buf,
size_t len, void *data)
{
struct config_source top;
Expand Down Expand Up @@ -1132,7 +1132,7 @@ static int git_config_from_blob_sha1(config_fn_t fn,
return error("reference '%s' does not point to a blob", name);
}

ret = git_config_from_buf(fn, name, buf, size, data);
ret = git_config_from_mem(fn, name, buf, size, data);
free(buf);

return ret;
Expand Down
2 changes: 1 addition & 1 deletion submodule-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ static const struct submodule *config_from(struct submodule_cache *cache,
parameter.commit_sha1 = commit_sha1;
parameter.gitmodules_sha1 = sha1;
parameter.overwrite = 0;
git_config_from_buf(parse_config, rev.buf, config, config_size,
git_config_from_mem(parse_config, rev.buf, config, config_size,
&parameter);
free(config);

Expand Down

0 comments on commit 7454ee3

Please sign in to comment.