diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index 6df5d7c5cbe2cd524cda9e0636c3ed5a8259cf33..49c10bf221961363b1edd073c926fe1bf92880c8 100644 (file)
--- a/builtin-read-tree.c
+++ b/builtin-read-tree.c
}
merge->ce_flags &= ~htons(CE_STAGEMASK);
}
merge->ce_flags &= ~htons(CE_STAGEMASK);
- add_cache_entry(merge, ADD_CACHE_OK_TO_ADD);
+ add_cache_entry(merge, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE);
return 1;
}
return 1;
}
else
verify_absent(ce->name, "removed");
ce->ce_mode = 0;
else
verify_absent(ce->name, "removed");
ce->ce_mode = 0;
- add_cache_entry(ce, ADD_CACHE_OK_TO_ADD);
+ add_cache_entry(ce, ADD_CACHE_OK_TO_ADD|ADD_CACHE_OK_TO_REPLACE);
invalidate_ce_path(ce);
return 1;
}
invalidate_ce_path(ce);
return 1;
}
@@ -870,7 +870,7 @@ static const char read_tree_usage[] = "git-read-tree (<sha> | [[-m [--aggressive
static struct lock_file lock_file;
static struct lock_file lock_file;
-int cmd_read_tree(int argc, const char **argv, char **envp)
+int cmd_read_tree(int argc, const char **argv, const char *prefix)
{
int i, newfd, stage = 0;
unsigned char sha1[20];
{
int i, newfd, stage = 0;
unsigned char sha1[20];
state.quiet = 1;
state.refresh_cache = 1;
state.quiet = 1;
state.refresh_cache = 1;
- setup_git_directory();
git_config(git_default_config);
newfd = hold_lock_file_for_update(&lock_file, get_index_file());
git_config(git_default_config);
newfd = hold_lock_file_for_update(&lock_file, get_index_file());