Merge branch 'jc/index-output'
authorJunio C Hamano <junkio@cox.net>
Sat, 7 Apr 2007 09:26:24 +0000 (02:26 -0700)
committerJunio C Hamano <junkio@cox.net>
Sat, 7 Apr 2007 09:26:24 +0000 (02:26 -0700)
* 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

1  2 
builtin-add.c
builtin-apply.c
builtin-mv.c
builtin-update-index.c
cache.h
merge-recursive.c

diff --cc builtin-add.c
Simple merge
diff --cc builtin-apply.c
index 4b8311b4de3f5c5d93352dac62856d67acfb143f,12011c1c9ef866c6c8dedc2df3f5b39034918c54..fd92ef7174dae1586921ebd34233c93b381106de
@@@ -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");
        }
  
diff --cc builtin-mv.c
Simple merge
Simple merge
diff --cc cache.h
Simple merge
Simple merge