Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] optionally disable overwriting of ignored files

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:21

Possibly related (same subject, not in this thread)

Clemens Buchacher [off-list ref] writes:
quoted hunk
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 5affb6f..121a6a3 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -389,6 +389,11 @@ static int merge_working_tree(struct checkout_opts *opts,
 		topts.gently = opts->merge && old->commit;
 		topts.verbose_update = !opts->quiet;
 		topts.fn = twoway_merge;
+		if (overwrite_ignored) {
+			topts.dir = xcalloc(1, sizeof(*topts.dir));
+			topts.dir->flags |= DIR_SHOW_IGNORED;
+			topts.dir->exclude_per_dir = ".gitignore";
+		}
 		tree = parse_tree_indirect(old->commit ?
 					   old->commit->object.sha1 :
 					   (unsigned char *)EMPTY_TREE_SHA1_BIN);
What is this patch based on?  I don't see a branch that has these two
lines adjacent to each other as the preimage...
 		topts.fn = twoway_merge;
 		tree = parse_tree_indirect(old->commit ?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help