else
exit_status |= add_files_to_cache(repo, prefix,
&pathspec, ps_matched,
- include_sparse, flags);
+ include_sparse, flags, ignored_too);
if (take_worktree_changes && !add_renormalize && !ignore_add_errors &&
report_path_error(ps_matched, &pathspec))
*/
add_files_to_cache(the_repository, NULL, NULL, NULL, 0,
- 0);
+ 0, 0);
init_ui_merge_options(&o, the_repository);
o.verbosity = 0;
work = write_in_core_index_as_tree(the_repository);
repo_hold_locked_index(the_repository, &index_lock,
LOCK_DIE_ON_ERROR);
add_files_to_cache(the_repository, also ? prefix : NULL,
- &pathspec, ps_matched, 0, 0);
+ &pathspec, ps_matched, 0, 0, 0 );
if (!all && report_path_error(ps_matched, &pathspec))
exit(128);
int add_files_to_cache(struct repository *repo, const char *prefix,
const struct pathspec *pathspec, char *ps_matched,
- int include_sparse, int flags);
+ int include_sparse, int flags, int ignored_too );
void overlay_tree_on_index(struct index_state *istate,
const char *tree_name, const char *prefix);
struct update_callback_data {
struct index_state *index;
+ struct repository *repo;
+ struct pathspec *pathspec;
int include_sparse;
int flags;
int add_errors;
+ int ignored_too;
};
static int fix_unmerged_status(struct diff_filepair *p,
default:
die(_("unexpected diff status %c"), p->status);
case DIFF_STATUS_MODIFIED:
- case DIFF_STATUS_TYPE_CHANGED:
+ case DIFF_STATUS_TYPE_CHANGED: {
if (add_file_to_index(data->index, path, data->flags)) {
if (!(data->flags & ADD_CACHE_IGNORE_ERRORS))
die(_("updating files failed"));
int add_files_to_cache(struct repository *repo, const char *prefix,
const struct pathspec *pathspec, char *ps_matched,
- int include_sparse, int flags)
+ int include_sparse, int flags, int ignored_too )
{
struct odb_transaction *transaction;
struct update_callback_data data;
data.index = repo->index;
data.include_sparse = include_sparse;
data.flags = flags;
+ data.repo = repo;
+ data.ignored_too = ignored_too;
+ data.pathspec = (struct pathspec *)pathspec;
repo_init_revisions(repo, &rev, prefix);
setup_revisions(0, NULL, &rev, NULL);