path: root/apply.h
diff options
authorMartin Ågren <>2017-10-05 20:32:10 (GMT)
committerJunio C Hamano <>2017-10-06 01:07:18 (GMT)
commitd13cd4c92760d8fe01fb51fbab556a4d1f3713b4 (patch)
tree0e75e587035287c7875387a157826cac74ec6677 /apply.h
parent6d058c882643dc45c8d708be98e86c38f25511a9 (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'apply.h')
1 files changed, 1 insertions, 2 deletions
diff --git a/apply.h b/apply.h
index cf00cda..dc4a019 100644
--- a/apply.h
+++ b/apply.h
@@ -36,9 +36,8 @@ enum apply_verbosity {
struct apply_state {
const char *prefix;
- /* These are lock_file related */
+ /* Lock file */
struct lock_file lock_file;
- int newfd;
/* These control what gets looked at and modified */
int apply; /* this is not a dry-run */