Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
submodule-config: use explicit empty string instead of strbuf in config_from()
author
René Scharfe
<l.s.r@web.de>
Tue, 19 Jul 2016 19:05:43 +0000
(21:05 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 19 Jul 2016 19:16:57 +0000
(12:16 -0700)
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>
submodule-config.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
0b65a8d
)
diff --git
a/submodule-config.c
b/submodule-config.c
index 7f67ec0c6a826cca0ba80ce5990d5f0f3a0dcaa6..1210b267ddf9cd8e8ed4d9c1ce534abe2b3076ad 100644
(file)
--- 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)
{
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];
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;
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);
config, config_size, ¶meter);
free(config);