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>
René Scharfe committed
Jul 19, 2016 at 21:05 UTC
508a285ceab4523412546a92cd9444f8e78065e1
1 file changed
+1
-2
submodule-config.c
+1
-2
@@ -375,7 +375,6 @@ static const struct submodule *config_from(struct submodule_cache *cache,
375
const unsigned char *commit_sha1, const char *key,
376
enum lookup_type lookup_type)
377
{
378
- struct strbuf rev = STRBUF_INIT;
378
unsigned long config_size;
379
char *config;
380
unsigned char sha1[20];
@@ -426,7 +425,7 @@ static const struct submodule *config_from(struct submodule_cache *cache,
425
parameter.commit_sha1 = commit_sha1;
426
parameter.gitmodules_sha1 = sha1;
427
parameter.overwrite = 0;
429
- git_config_from_mem(parse_config, "submodule-blob", rev.buf,
428
+ git_config_from_mem(parse_config, "submodule-blob", "",
429
config, config_size, ¶meter);
430
free(config);
431