Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-11-06 07:11:21 +0300
committerJunio C Hamano <gitster@pobox.com>2017-11-06 07:11:21 +0300
commit0b646bcac96a57e345887e607e0b8c9a64ff262a (patch)
tree4c4e0e29d1743413c7fa0e1172ccebb7cbc37191 /builtin/apply.c
parentcb5918aa0d50f50e83787f65c2ddc3dcb10159fe (diff)
parentb74c90fb419b002c664b0236f2941c34786b18b9 (diff)
Merge branch 'ma/lockfile-fixes'
An earlier update made it possible to use an on-stack in-core lockfile structure (as opposed to having to deliberately leak an on-heap one). Many codepaths have been updated to take advantage of this new facility. * ma/lockfile-fixes: read_cache: roll back lock in `update_index_if_able()` read-cache: leave lock in right state in `write_locked_index()` read-cache: drop explicit `CLOSE_LOCK`-flag cache.h: document `write_locked_index()` apply: remove `newfd` from `struct apply_state` apply: move lockfile into `apply_state` cache-tree: simplify locking logic checkout-index: simplify locking logic tempfile: fix documentation on `delete_tempfile()` lockfile: fix documentation on `close_lock_file_gently()` treewide: prefer lockfiles on the stack sha1_file: do not leak `lock_file`
Diffstat (limited to 'builtin/apply.c')
-rw-r--r--builtin/apply.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 81b9a61c37..48d3989331 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -9,8 +9,6 @@ static const char * const apply_usage[] = {
NULL
};
-static struct lock_file lock_file;
-
int cmd_apply(int argc, const char **argv, const char *prefix)
{
int force_apply = 0;
@@ -18,7 +16,7 @@ int cmd_apply(int argc, const char **argv, const char *prefix)
int ret;
struct apply_state state;
- if (init_apply_state(&state, prefix, &lock_file))
+ if (init_apply_state(&state, prefix))
exit(128);
argc = apply_parse_options(argc, argv,