diff options
author | Jeff King <peff@peff.net> | 2019-04-18 17:18:35 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-19 14:33:21 +0900 |
commit | 08bf354de71a806bad319ec236740ac698b58a5b (patch) | |
tree | 8056fc31cd23e69c206b54f2bd2b91ad16f1f047 /t/t5515/fetch.master_.._.git | |
parent | untracked-cache: simplify parsing by dropping "next" (diff) | |
download | tgif-08bf354de71a806bad319ec236740ac698b58a5b.tar.xz |
untracked-cache: simplify parsing by dropping "len"
The code which parses untracked-cache extensions from disk keeps a "len"
variable, which is the size of the string we are parsing. But since we
now have an "end of string" variable, we can just use that to get the
length when we need it. This eliminates the need to keep "len" up to
date (and removes the possibility of any errors where "len" and "eos"
get out of sync).
As a bonus, it means we are not storing a string length in an "int",
which is a potential source of overflows (though in this case it seems
fairly unlikely for that to cause any memory problems).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5515/fetch.master_.._.git')
0 files changed, 0 insertions, 0 deletions