summaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-07 02:26:24 -0700
committerJunio C Hamano <junkio@cox.net>2007-04-07 02:26:24 -0700
commitee9693e246669f48f6b058a1044cefa973a44c22 (patch)
tree80f0985cb14b578e9d13c04ad39a47dd8eccb3a2 /builtin-apply.c
parent39415449ee9b0bfbd6026e38c6e5d43f99759bf2 (diff)
parent5e7f56ac33f7a5583f9fa4e0b6088709fea7a6f8 (diff)
downloadgit-ee9693e246669f48f6b058a1044cefa973a44c22.tar.gz
Merge branch 'jc/index-output'
* jc/index-output: git-read-tree --index-output=<file> _GIT_INDEX_OUTPUT: allow plumbing to output to an alternative index file. Conflicts: builtin-apply.c
Diffstat (limited to 'builtin-apply.c')
-rw-r--r--builtin-apply.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index 4b8311b4de..fd92ef7174 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -2664,8 +2664,8 @@ static int apply_patch(int fd, const char *filename, int inaccurate_eof)
update_index = check_index && apply;
if (update_index && newfd < 0)
- newfd = hold_lock_file_for_update(&lock_file,
- get_index_file(), 1);
+ newfd = hold_locked_index(&lock_file, 1);
+
if (check_index) {
if (read_cache() < 0)
die("unable to read index file");
@@ -2872,7 +2872,7 @@ int cmd_apply(int argc, const char **argv, const char *unused_prefix)
if (update_index) {
if (write_cache(newfd, active_cache, active_nr) ||
- close(newfd) || commit_lock_file(&lock_file))
+ close(newfd) || commit_locked_index(&lock_file))
die("Unable to write new index file");
}