summaryrefslogtreecommitdiff
path: root/Documentation/RelNotes/2.13.4.txt
diff options
context:
space:
mode:
authorPatryk Obara <patryk.obara@gmail.com>2017-08-18 20:33:14 +0200
committerJunio C Hamano <gitster@pobox.com>2017-08-18 12:41:06 -0700
commitcfa5bf16082e25c9221e26851ca890f71ddf5a5f (patch)
treee78e48e70eeb69d60709edffbeead39bec96b9e2 /Documentation/RelNotes/2.13.4.txt
parentbc65d2262d7c676cc7a0100d8be84a0690e10702 (diff)
downloadgit-po/read-graft-line.tar.gz
commit: rewrite read_graft_linepo/read-graft-line
Old implementation determined number of hashes by dividing length of line by length of hash, which works only if all hash representations have same length. New graft line parser works in two phases: 1. In first phase line is scanned to verify correctness and compute number of hashes, then graft struct is allocated. 2. In second phase line is scanned again to fill up already allocated graft struct. This way graft parsing code can support different sizes of hashes without any further code adaptations. A number of alternative implementations were considered and discarded: - Modifying graft structure to store oid_array instead of FLEXI_ARRAY indicates undesirable usage of struct to readers. - Parsing into temporary string_list or oid_array complicates code by adding more return paths, as these structures needs to be cleared before returning from function. - Determining number of hashes by counting separators might cause maintenance issues, if this function needs to be modified in future again. Signed-off-by: Patryk Obara <patryk.obara@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/RelNotes/2.13.4.txt')
0 files changed, 0 insertions, 0 deletions