Merge branch 'nd/maint-ignore-exclude'
authorJunio C Hamano <gitster@pobox.com>
Mon, 5 Dec 2011 23:25:12 +0000 (15:25 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Dec 2011 23:25:12 +0000 (15:25 -0800)
* nd/maint-ignore-exclude:
checkout,merge: loosen overwriting untracked file check based on info/exclude

builtin/checkout.c
builtin/merge.c
index 2a8077242500d54ac50d5829a86b14803fc69126..51840b9784f0daec21087ec101304eaa6cbf73cd 100644 (file)
@@ -411,7 +411,7 @@ static int merge_working_tree(struct checkout_opts *opts,
                topts.fn = twoway_merge;
                topts.dir = xcalloc(1, sizeof(*topts.dir));
                topts.dir->flags |= DIR_SHOW_IGNORED;
-               topts.dir->exclude_per_dir = ".gitignore";
+               setup_standard_excludes(topts.dir);
                tree = parse_tree_indirect(old->commit ?
                                           old->commit->object.sha1 :
                                           EMPTY_TREE_SHA1_BIN);
index 1712b93e45851fe6160dbab77dc23334cb96be14..8a7bebd96acfb8f627352216ca2f8e344e8d4a53 100644 (file)
@@ -775,7 +775,7 @@ int checkout_fast_forward(const unsigned char *head, const unsigned char *remote
        memset(&t, 0, sizeof(t));
        memset(&dir, 0, sizeof(dir));
        dir.flags |= DIR_SHOW_IGNORED;
-       dir.exclude_per_dir = ".gitignore";
+       setup_standard_excludes(&dir);
        opts.dir = &dir;
 
        opts.head_idx = 1;