aboutsummaryrefslogtreecommitdiff
path: root/builtin/checkout.c
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2015-07-06 13:30:56 -0400
committerJunio C Hamano <gitster@pobox.com>2015-07-06 11:07:48 -0700
commit0ca560cb975aa081971d0fb1586e0206156fa22f (patch)
treef8abfad257abc666fb4e001c3986aec43bdd88d5 /builtin/checkout.c
parentb979d95027242455b10e6f566b0e96c5f30cc908 (diff)
downloadgit-0ca560cb975aa081971d0fb1586e0206156fa22f.tar.gz
git-0ca560cb975aa081971d0fb1586e0206156fa22f.tar.xz
checkout: require worktree unconditionally
In order to allow linked worktree creation via "git checkout --to" from a bare repository, 3473ad0 (checkout: don't require a work tree when checking out into a new one, 2014-11-30) dropped git-checkout's unconditional NEED_WORK_TREE requirement and instead performed worktree setup conditionally based upon presence or absence of the --to option. Now that --to has been retired and git-checkout is no longer responsible for linked worktree creation, the NEED_WORK_TREE requirement can be re-instated. This effectively reverts 3473ad0, except for the tests it added which now check bare repository behavior of "git worktree add" instead. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r--builtin/checkout.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index b1e68b326..57545543e 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -1218,8 +1218,6 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
opts.new_worktree_mode = getenv("GIT_CHECKOUT_NEW_WORKTREE") != NULL;
- setup_work_tree();
-
if (conflict_style) {
opts.merge = 1; /* implied */
git_xmerge_config("merge.conflictstyle", conflict_style, NULL);