tempfile: update comment describing state transitions
commit320fa579ec966051fd5bed1c88c39d5512a4bd17
authorJeff King <peff@peff.net>
Tue, 30 Aug 2022 19:46:01 +0000 (30 15:46 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Aug 2022 21:16:51 +0000 (30 14:16 -0700)
treec7da56e82270ecbb400a1631cb375fb8a6062b8b
parent77a42b3b84761782b8223e90d60a06e71524ef07
tempfile: update comment describing state transitions

Back when 1a9d15db25 (tempfile: a new module for handling temporary
files, 2015-08-10) added this comment, tempfile structs were held in
memory for the life of a process, and there were various guarantees
about which fields were valid in which states.

Since 422a21c6a0 (tempfile: remove deactivated list entries, 2017-09-05)
and 076aa2cbda (tempfile: auto-allocate tempfiles on heap, 2017-09-05),
the flow is quite different: objects come and go from the list, and
inactive ones are deallocated. And the previous commit removed the
"active" flag from the struct entirely.

Let's bring the comment up to date with the current code.

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