Merge branch 'en/removing-untracked-fixes'
Various fixes in code paths that move untracked files away to make room. * en/removing-untracked-fixes: Documentation: call out commands that nuke untracked files/directories Comment important codepaths regarding nuking untracked files/dirs unpack-trees: avoid nuking untracked dir in way of locally deleted file unpack-trees: avoid nuking untracked dir in way of unmerged file Change unpack_trees' 'reset' flag into an enum Remove ignored files by default when they are in the way unpack-trees: make dir an internal-only struct unpack-trees: introduce preserve_ignored to unpack_trees_options read-tree, merge-recursive: overwrite ignored files by default checkout, read-tree: fix leak of unpack_trees_options.dir t2500: add various tests for nuking untracked files
This commit is contained in:
@ -4062,11 +4062,7 @@ static int checkout(struct merge_options *opt,
|
||||
unpack_opts.quiet = 0; /* FIXME: sequencer might want quiet? */
|
||||
unpack_opts.verbose_update = (opt->verbosity > 2);
|
||||
unpack_opts.fn = twoway_merge;
|
||||
if (1/* FIXME: opts->overwrite_ignore*/) {
|
||||
CALLOC_ARRAY(unpack_opts.dir, 1);
|
||||
unpack_opts.dir->flags |= DIR_SHOW_IGNORED;
|
||||
setup_standard_excludes(unpack_opts.dir);
|
||||
}
|
||||
unpack_opts.preserve_ignored = 0; /* FIXME: !opts->overwrite_ignore */
|
||||
parse_tree(prev);
|
||||
init_tree_desc(&trees[0], prev->buffer, prev->size);
|
||||
parse_tree(next);
|
||||
@ -4074,8 +4070,6 @@ static int checkout(struct merge_options *opt,
|
||||
|
||||
ret = unpack_trees(2, trees, &unpack_opts);
|
||||
clear_unpack_trees_porcelain(&unpack_opts);
|
||||
dir_clear(unpack_opts.dir);
|
||||
FREE_AND_NULL(unpack_opts.dir);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user