From: Nguyễn Thái Ngọc Duy Date: Thu, 28 Aug 2008 13:03:22 +0000 (+0700) Subject: read-tree: setup worktree if merge is required X-Git-Tag: v1.6.0.2~22^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b6469a81d228bd4b3e3fa62bbaf5fdd25915cd40;p=git.git read-tree: setup worktree if merge is required Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- 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)