diff options
author | René Scharfe <l.s.r@web.de> | 2016-07-19 21:05:43 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-19 12:16:57 -0700 |
commit | 508a285ceab4523412546a92cd9444f8e78065e1 (patch) | |
tree | cfca7067e81f807b59bbb1846cc87024c9350178 /submodule-config.c | |
parent | 0b65a8dbdb38962e700ee16776a3042beb489060 (diff) | |
download | git-508a285ceab4523412546a92cd9444f8e78065e1.tar.gz |
submodule-config: use explicit empty string instead of strbuf in config_from()
Use a string constant instead of an empty strbuf to shorten the code
and make it easier to read.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule-config.c')
-rw-r--r-- | submodule-config.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/submodule-config.c b/submodule-config.c index 7f67ec0c6a..1210b267dd 100644 --- a/submodule-config.c +++ b/submodule-config.c @@ -375,7 +375,6 @@ static const struct submodule *config_from(struct submodule_cache *cache, const unsigned char *commit_sha1, const char *key, enum lookup_type lookup_type) { - struct strbuf rev = STRBUF_INIT; unsigned long config_size; char *config; unsigned char sha1[20]; @@ -426,7 +425,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_mem(parse_config, "submodule-blob", rev.buf, + git_config_from_mem(parse_config, "submodule-blob", "", config, config_size, ¶meter); free(config); |