diff options
author | Jeff King <peff@peff.net> | 2013-01-23 01:26:42 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-23 12:58:27 -0800 |
commit | 6bfe19ee168cd47295e9d25b4343ec318fab3790 (patch) | |
tree | a097452fd0f29648435b113213a72d3e84adfa53 /INSTALL | |
parent | submodule: use parse_config_key when parsing config (diff) | |
download | tgif-6bfe19ee168cd47295e9d25b4343ec318fab3790.tar.xz |
submodule: simplify memory handling in config parsing
We keep a strbuf for the name of the submodule, even though
we only ever add one string to it. Let's just use xmemdupz
instead, which is slightly more efficient and makes it
easier to follow what is going on.
Unfortunately, we still end up having to deal with some
memory ownership issues in some code branches, as we have to
allocate the string in order to do a string list lookup, and
then only sometimes want to hand ownership of that string
over to the string_list. Still, making that explicit in the
code (as opposed to sometimes detaching the strbuf, and then
always releasing it) makes it a little more obvious what is
going on.
Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'INSTALL')
0 files changed, 0 insertions, 0 deletions