summaryrefslogtreecommitdiff
path: root/builtin-read-tree.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2008-08-28 20:03:22 +0700
committerJunio C Hamano <gitster@pobox.com>2008-08-28 22:47:17 -0700
commitb6469a81d228bd4b3e3fa62bbaf5fdd25915cd40 (patch)
tree8348546ef14483cdbb52b1e736445b183ad2e529 /builtin-read-tree.c
parent6577f542b3ab64594c7d7a7db752e96be7234fb0 (diff)
downloadgit-b6469a81d228bd4b3e3fa62bbaf5fdd25915cd40.tar.gz
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>
Diffstat (limited to 'builtin-read-tree.c')
-rw-r--r--builtin-read-tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index 72a6de302f..dddc3044b8 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)