From: Junio C Hamano Date: Sat, 7 Apr 2007 09:26:24 +0000 (-0700) Subject: Merge branch 'jc/index-output' X-Git-Tag: v1.5.2-rc0~75 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ee9693e246669f48f6b058a1044cefa973a44c22;p=git.git Merge branch 'jc/index-output' * jc/index-output: git-read-tree --index-output= _GIT_INDEX_OUTPUT: allow plumbing to output to an alternative index file. Conflicts: builtin-apply.c --- ee9693e246669f48f6b058a1044cefa973a44c22 diff --cc builtin-apply.c index 4b8311b4d,12011c1c9..fd92ef717 --- a/builtin-apply.c +++ b/builtin-apply.c @@@ -2662,10 -2662,10 +2662,10 @@@ static int apply_patch(int fd, const ch if (whitespace_error && (new_whitespace == error_on_whitespace)) apply = 0; - write_index = check_index && apply; - if (write_index && newfd < 0) + 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"); @@@ -2870,9 -2870,9 +2870,9 @@@ int cmd_apply(int argc, const char **ar whitespace_error == 1 ? "s" : ""); } - if (write_index) { + 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"); }