summaryrefslogtreecommitdiff
path: root/parse-options.c
diff options
context:
space:
mode:
authorLibravatar Michael Haggerty <mhagger@alum.mit.edu>2017-08-26 10:28:05 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-08-26 09:21:01 -0700
commit98c9897d9e40f49cfb416801851656bac494ae40 (patch)
tree84f291d450285da9b525a0ed293e4ba4cd164926 /parse-options.c
parentload_subtree(): fix incorrect comment (diff)
downloadtgif-98c9897d9e40f49cfb416801851656bac494ae40.tar.xz
load_subtree(): separate logic for internal vs. terminal entries
There are only two legitimate notes path components: * A hexadecimal string that fills the rest of the SHA-1 * A two-digit hexadecimal string that constitutes another internal node. So handle those two cases at the top level, and reject others as non-notes without trying to parse them. The logic separation also simplifies upcoming changes. This prevents us from leaking memory for a leaf_node in the case of wrong-sized paths. There are still memory leaks in this code; they will be fixed in upcoming commits. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.c')
0 files changed, 0 insertions, 0 deletions