untracked-cache: simplify parsing by dropping "next"
commitb511d6d569ce8baee888700ebd12f82d991a5250
authorJeff King <peff@peff.net>
Thu, 18 Apr 2019 21:17:38 +0000 (18 17:17 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Apr 2019 05:30:58 +0000 (19 14:30 +0900)
treec10ff19817c3c2ae8b06c5bc08a676dd663305d7
parentc6909f9959d394db8b76f08a6e59e5a82dade07a
untracked-cache: simplify parsing by dropping "next"

When we parse an on-disk untracked cache, we have two pointers, "data"
and "next". As we parse, we point "next" to the end of an element, and
then later update "data" to match.

But we actually don't need two pointers. Each parsing step can just
update "data" directly from other variables we hold (and we don't have
to worry about bailing in an intermediate state, since any parsing
failure causes us to immediately discard "data" and return).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir.c