Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
checkout: don't require a work tree when checking out into a new one
[gitweb.git]
/
builtin
/
checkout.c
diff --git
a/builtin/checkout.c
b/builtin/checkout.c
index 5dfdbda1a6bc248e86ebdc3f951f73c4a29fd192..8c5276cf443f5d1e84cd5fd34e5f899afd3e58b6 100644
(file)
--- a/
builtin/checkout.c
+++ b/
builtin/checkout.c
@@
-1364,6
+1364,9
@@
int cmd_checkout(int argc, const char **argv, const char *prefix)
if (opts.new_worktree_mode)
opts.new_worktree = NULL;
+ if (!opts.new_worktree)
+ setup_work_tree();
+
if (conflict_style) {
opts.merge = 1; /* implied */
git_xmerge_config("merge.conflictstyle", conflict_style, NULL);