]> git.ipfire.org Git - thirdparty/git.git/commit - apply.c
apply: remove `newfd` from `struct apply_state`
authorMartin Ågren <martin.agren@gmail.com>
Thu, 5 Oct 2017 20:32:10 +0000 (22:32 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Oct 2017 01:07:18 +0000 (10:07 +0900)
commitd13cd4c92760d8fe01fb51fbab556a4d1f3713b4
tree0e75e587035287c7875387a157826cac74ec6677
parent6d058c882643dc45c8d708be98e86c38f25511a9
apply: remove `newfd` from `struct apply_state`

Similar to a previous patch, we do not need to use `newfd` to signal
that we have a lockfile to clean up. We can just unconditionally call
`rollback_lock_file`. If we do not hold the lock, it will be a no-op.

Where we check `newfd` to decide whether we need to take the lock, we
can instead use `is_lock_file_locked()`.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
apply.c
apply.h