Merge branch 'cr/reset'

* cr/reset:
  Simplify cache API
  An additional test for "git-reset -- path"
  Make "git reset" a builtin.
  Move make_cache_entry() from merge-recursive.c into read-cache.c
  Add tests for documented features of "git reset".
This commit is contained in:
Junio C Hamano
2007-09-18 00:42:01 -07:00
14 changed files with 718 additions and 44 deletions

View File

@ -2423,7 +2423,6 @@ static void remove_file(struct patch *patch, int rmdir_empty)
if (update_index) {
if (remove_file_from_cache(patch->old_name) < 0)
die("unable to remove %s from index", patch->old_name);
cache_tree_invalidate_path(active_cache_tree, patch->old_name);
}
if (!cached) {
if (S_ISGITLINK(patch->old_mode)) {
@ -2578,7 +2577,6 @@ static void create_file(struct patch *patch)
mode = S_IFREG | 0644;
create_one_file(path, mode, buf, size);
add_index_file(path, mode, buf, size);
cache_tree_invalidate_path(active_cache_tree, path);
}
/* phase zero is to remove, phase one is to create */