cache-tree: update API to take abitrary flags
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
828ea97de4
commit
e859c69b26
@ -400,7 +400,7 @@ static char *prepare_index(int argc, const char **argv, const char *prefix,
|
||||
fd = hold_locked_index(&index_lock, 1);
|
||||
add_files_to_cache(also ? prefix : NULL, pathspec, 0);
|
||||
refresh_cache_or_die(refresh_flags);
|
||||
update_main_cache_tree(1);
|
||||
update_main_cache_tree(WRITE_TREE_SILENT);
|
||||
if (write_cache(fd, active_cache, active_nr) ||
|
||||
close_lock_file(&index_lock))
|
||||
die(_("unable to write new_index file"));
|
||||
@ -421,7 +421,7 @@ static char *prepare_index(int argc, const char **argv, const char *prefix,
|
||||
fd = hold_locked_index(&index_lock, 1);
|
||||
refresh_cache_or_die(refresh_flags);
|
||||
if (active_cache_changed) {
|
||||
update_main_cache_tree(1);
|
||||
update_main_cache_tree(WRITE_TREE_SILENT);
|
||||
if (write_cache(fd, active_cache, active_nr) ||
|
||||
commit_locked_index(&index_lock))
|
||||
die(_("unable to write new_index file"));
|
||||
|
||||
Reference in New Issue
Block a user