aboutsummaryrefslogtreecommitdiffstats
path: root/submodule-config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-04-28 15:49:58 -0700
committerJunio C Hamano <gitster@pobox.com>2020-04-28 15:49:58 -0700
commit342bc9e29fa462b127d9e1c02aa58349e58e56f0 (patch)
tree6cfcbb9ebfbd25bc1d42410476336c333917a51d /submodule-config.c
parent2abd648b17899679f9a76bfdeba8f620fa6fff21 (diff)
parent348482dede19296e5caa33ed73010278767c2348 (diff)
downloadgit-342bc9e29fa462b127d9e1c02aa58349e58e56f0.tar.gz
Merge branch 'jk/config-use-size-t'
The config API made mixed uses of int and size_t types to represent length of various pieces of text it parsed, which has been updated to use the correct type (i.e. size_t) throughout. * jk/config-use-size-t: config: reject parsing of files over INT_MAX config: use size_t to store parsed variable baselen git_config_parse_key(): return baselen as size_t config: drop useless length variable in write_pair() parse_config_key(): return subsection len as size_t remote: drop auto-strlen behavior of make_branch() and make_rewrite()
Diffstat (limited to 'submodule-config.c')
-rw-r--r--submodule-config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/submodule-config.c b/submodule-config.c
index 4d1c92d582..e175dfbc38 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -225,7 +225,8 @@ static int name_and_item_from_var(const char *var, struct strbuf *name,
struct strbuf *item)
{
const char *subsection, *key;
- int subsection_len, parse;
+ size_t subsection_len;
+ int parse;
parse = parse_config_key(var, "submodule", &subsection,
&subsection_len, &key);
if (parse < 0 || !subsection)