diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-07-12 19:38:21 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-07-12 19:38:21 +0300 |
commit | c925fe23684455735c3bb1903803643a24a58d8f (patch) | |
tree | 300efa4a8e232730a677a9337d591d12388eebaa /builtin/worktree.c | |
parent | 0d1a1517835a10818f2d40d8780a268dbb5e20ce (diff) |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c index 050b443dc0..69248ba0a3 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) |