summaryrefslogtreecommitdiff
path: root/builtin/worktree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-07-12 16:38:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-07-12 16:38:21 (GMT)
commitc925fe23684455735c3bb1903803643a24a58d8f (patch)
tree300efa4a8e232730a677a9337d591d12388eebaa /builtin/worktree.c
parent0d1a1517835a10818f2d40d8780a268dbb5e20ce (diff)
downloadgit-c925fe23684455735c3bb1903803643a24a58d8f.zip
git-c925fe23684455735c3bb1903803643a24a58d8f.tar.gz
git-c925fe23684455735c3bb1903803643a24a58d8f.tar.bz2
Revert "checkout: retire --ignore-other-worktrees in favor of --force"
This reverts commit 0d1a1517835a10818f2d40d8780a268dbb5e20ce. When trying to switch to a different branch, that happens to be checked out in another working tree, the user shouldn't have to give up the other safety measures (like protecting the local changes that overlap the difference between the branches) while defeating the "no two checkouts of the same branch" safety. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/worktree.c')
-rw-r--r--builtin/worktree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 050b443..69248ba 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -303,7 +303,7 @@ static int add(int ac, const char **av, const char *prefix)
argv_array_push(&cmd, "checkout");
if (force)
- argv_array_push(&cmd, "--force");
+ argv_array_push(&cmd, "--ignore-other-worktrees");
if (new_branch)
argv_array_pushl(&cmd, "-b", new_branch, NULL);
if (new_branch_force)