@matheusbsbs / matheus-bagliano / commits / 2960a1d9ee
Fork 0

Fix read-tree --prefix=dir/.

The existing code is not wrong per-se, but it started scanning the index from a location that does not match the tree being read, and wasted cycles. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Apr 2, 2007 at 12:40 UTC 2960a1d9eef846de9cfd9d6e32d203339d792120
1 file changed +1
builtin-read-tree.c
+1
@@ -228,6 +228,7 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
228 if (0 <= pos)
229 die("file '%.*s' already exists.",
230 pfxlen-1, opts.prefix);
231 + opts.pos = -1 - pos;
232 }
233
234 if (opts.merge) {