]> git.ipfire.org Git - thirdparty/git.git/commit - tempfile.c
tempfile: prefer is_tempfile_active to bare access
authorJeff King <peff@peff.net>
Tue, 5 Sep 2017 12:14:36 +0000 (08:14 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Sep 2017 08:19:53 +0000 (17:19 +0900)
commite6fc267314d24fe9a81875b85b28a4b5d0fb78b1
treeae95fcbab7c41b0e7aa5f375b8dc43afbc85cbda
parent83a3069a3895de81fea720ffa6a3e47f9400fe04
tempfile: prefer is_tempfile_active to bare access

The tempfile code keeps an "active" flag, and we have a
number of assertions to make sure that the objects are being
used in the right order. Most of these directly check
"active" rather than using the is_tempfile_active()
accessor.

Let's prefer using the accessor, in preparation for it
growing more complicated logic (like checking for NULL).

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