From: Junio C Hamano Date: Fri, 20 Aug 2010 20:46:10 GMT Subject: Re: [PATCH] optionally disable overwriting of ignored files Message-ID: <7vtymp9fn1.fsf@alter.siamese.dyndns.org> In-Reply-To: <20100818233900.GA27531@localhost> Clemens Buchacher writes: > 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 ?