summaryrefslogtreecommitdiff
path: root/contrib/fast-import
diff options
context:
space:
mode:
authorLibravatar Ben Walton <bdwalton@gmail.com>2012-09-30 20:44:36 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-10-01 12:27:45 -0700
commit0971e992c4e2806b427a09239ee48a90280c9b15 (patch)
tree6532e27471433737cf22873d915a704282a9d595 /contrib/fast-import
parentGit 1.7.12.2 (diff)
downloadtgif-0971e992c4e2806b427a09239ee48a90280c9b15.tar.xz
Remove the hard coded length limit on variable names in config files
Previously while reading the variable names in config files, there was a 256 character limit with at most 128 of those characters being used by the section header portion of the variable name. This limitation was only enforced while reading the config files. It was possible to write a config file that was not subsequently readable. Instead of enforcing this limitation for both reading and writing, remove it entirely by changing the var member of the config_file struct to a strbuf instead of a fixed length buffer. Update all of the parsing functions in config.c to use the strbuf instead of the static buffer. The parsing functions that returned the base length of the variable name now return simply 0 for success and -1 for failure. The base length information is obtained through the strbuf's len member. We now send the buf member of the strbuf to external callback functions to preserve the external api. None of the external callers rely on the old size limitation for sizing their own buffers so removing the limit should have no externally visible effect. Signed-off-by: Ben Walton <bdwalton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/fast-import')
0 files changed, 0 insertions, 0 deletions