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>
This commit is contained in:
parent
9a4d8fdc25
commit
2960a1d9ee
@ -228,6 +228,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) {
|
||||
|
Loading…
Reference in New Issue
Block a user