]> git.ipfire.org Git - thirdparty/git.git/blobdiff - merge.c
config.mak.uname: remove unused the NO_R_TO_GCC_LINKER flag
[thirdparty/git.git] / merge.c
diff --git a/merge.c b/merge.c
index 753e461659e62812e60fe863bf76269cc8784f82..5fb88af10254a75557697345fd25cfcf19df9748 100644 (file)
--- a/merge.c
+++ b/merge.c
@@ -80,8 +80,8 @@ int checkout_fast_forward(struct repository *r,
        }
 
        memset(&opts, 0, sizeof(opts));
+       dir_init(&dir);
        if (overwrite_ignore) {
-               memset(&dir, 0, sizeof(dir));
                dir.flags |= DIR_SHOW_IGNORED;
                setup_standard_excludes(&dir);
                opts.dir = &dir;
@@ -102,6 +102,7 @@ int checkout_fast_forward(struct repository *r,
                clear_unpack_trees_porcelain(&opts);
                return -1;
        }
+       dir_clear(&dir);
        clear_unpack_trees_porcelain(&opts);
 
        if (write_locked_index(r->index, &lock_file, COMMIT_LOCK))