Skip to content

Commit 508a285

Browse files
rscharfegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0b65a8d commit 508a285

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

submodule-config.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ static const struct submodule *config_from(struct submodule_cache *cache,
375375
const unsigned char *commit_sha1, const char *key,
376376
enum lookup_type lookup_type)
377377
{
378-
struct strbuf rev = STRBUF_INIT;
379378
unsigned long config_size;
380379
char *config;
381380
unsigned char sha1[20];
@@ -426,7 +425,7 @@ static const struct submodule *config_from(struct submodule_cache *cache,
426425
parameter.commit_sha1 = commit_sha1;
427426
parameter.gitmodules_sha1 = sha1;
428427
parameter.overwrite = 0;
429-
git_config_from_mem(parse_config, "submodule-blob", rev.buf,
428+
git_config_from_mem(parse_config, "submodule-blob", "",
430429
config, config_size, &parameter);
431430
free(config);
432431

0 commit comments

Comments
 (0)