From b6469a81d228bd4b3e3fa62bbaf5fdd25915cd40 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Thu, 28 Aug 2008 20:03:22 +0700 Subject: [PATCH] read-tree: setup worktree if merge is required MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- builtin-read-tree.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin-read-tree.c b/builtin-read-tree.c index 72a6de302..dddc3044b 100644 --- a/builtin-read-tree.c +++ b/builtin-read-tree.c @@ -194,6 +194,8 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix) usage(read_tree_usage); if ((opts.dir && !opts.update)) die("--exclude-per-directory is meaningless unless -u"); + if (opts.merge && !opts.index_only) + setup_work_tree(); if (opts.merge) { if (stage < 2) -- 2.30.2