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
This commit is contained in:
Junio C Hamano
2007-04-07 02:26:24 -07:00
13 changed files with 66 additions and 25 deletions

View File

@ -495,7 +495,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
/* We can't free this memory, it becomes part of a linked list parsed atexit() */
lock_file = xcalloc(1, sizeof(struct lock_file));
newfd = hold_lock_file_for_update(lock_file, get_index_file(), 0);
newfd = hold_locked_index(lock_file, 0);
if (newfd < 0)
lock_error = errno;
@ -661,7 +661,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
get_index_file(), strerror(lock_error));
}
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");
}