]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/gc: don't peek into `struct lock_file`
authorMartin Ågren <martin.agren@gmail.com>
Tue, 5 Jan 2021 19:23:46 +0000 (20:23 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Jan 2021 21:53:32 +0000 (13:53 -0800)
commitd4a497664875c84c4ab8318625bb8881508ac18a
tree848c96bd9fe84614f1cf7865273d83c6bdfb53e6
parent71ca53e8125e36efbda17293c50027d31681a41f
builtin/gc: don't peek into `struct lock_file`

A `struct lock_file` is pretty much just a wrapper around a tempfile.
But it's easy enough to avoid relying on this. Use the wrappers that the
lock file API provides rather than peeking at the temp file or even into
*its* internals.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/gc.c