Code

filter-branch: fix behaviour of '-k'
[git.git] / builtin-read-tree.c
index 213bd93c7f535ad90c49bc30280563fc3f4e6268..316fb0f8dae022b35a89b71c94a22331a77a500a 100644 (file)
@@ -233,6 +233,7 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
                if (0 <= pos)
                        die("file '%.*s' already exists.",
                                        pfxlen-1, opts.prefix);
+               opts.pos = -1 - pos;
        }
 
        if (opts.merge) {