@matheusbsbs / matheus-bagliano / commits / b6469a81d2
Fork 0

read-tree: setup worktree if merge is required

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Aug 28, 2008 at 20:03 UTC b6469a81d228bd4b3e3fa62bbaf5fdd25915cd40
1 file changed +2
builtin-read-tree.c
+2
@@ -194,6 +194,8 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
194 usage(read_tree_usage);
195 if ((opts.dir && !opts.update))
196 die("--exclude-per-directory is meaningless unless -u");
197 + if (opts.merge && !opts.index_only)
198 + setup_work_tree();
199
200 if (opts.merge) {
201 if (stage < 2)