summaryrefslogtreecommitdiffstats
path: root/builtin/am.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2021-09-27 18:33:43 +0200
committerJunio C Hamano <gitster@pobox.com>2021-09-27 22:38:37 +0200
commit1b5f37334a2603c7134da7accba76276d8d31cf6 (patch)
treec4eb6651858eebdb79be5c6f614f13cca9b09786 /builtin/am.c
parentunpack-trees: make dir an internal-only struct (diff)
downloadgit-1b5f37334a2603c7134da7accba76276d8d31cf6.tar.xz
git-1b5f37334a2603c7134da7accba76276d8d31cf6.zip
Remove ignored files by default when they are in the way
Change several commands to remove ignored files by default when they are in the way. Since some commands (checkout, merge) take a --no-overwrite-ignore option to allow the user to configure this, and it may make sense to add that option to more commands (and in the case of merge, actually plumb that configuration option through to more of the backends than just the fast-forwarding special case), add little comments about where such flags would be used. Incidentally, this fixes a test failure in t7112. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/am.c')
-rw-r--r--builtin/am.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 567ecd882b..93beb66197 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -1920,8 +1920,7 @@ static int fast_forward_to(struct tree *head, struct tree *remote, int reset)
opts.merge = 1;
opts.reset = reset;
if (!reset)
- /* FIXME: Default should be to remove ignored files */
- opts.preserve_ignored = 1;
+ opts.preserve_ignored = 0; /* FIXME: !overwrite_ignore */
opts.fn = twoway_merge;
init_tree_desc(&t[0], head->buffer, head->size);
init_tree_desc(&t[1], remote->buffer, remote->size);