diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-10-14 01:15:57 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-14 01:15:57 +0300 |
commit | a7c2daa06d6f7d8fd13a1d72f23741acbaeba522 (patch) | |
tree | b1b0095d267b98188a7ae24ac77934298b665649 /merge-ort.c | |
parent | 1fdfb774aaaa0ee8acb0a1ec9b601e5a2d2999f1 (diff) | |
parent | 0e29222e0c2f68118cdd3412515539b74433b732 (diff) |
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
Diffstat (limited to 'merge-ort.c')
-rw-r--r-- | merge-ort.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/merge-ort.c b/merge-ort.c index ab42c5d847..e5456f4722 100644 --- a/merge-ort.c +++ b/merge-ort.c @@ -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; } |