OSDN Git Service

Merge branch 'nd/worktree-various-heads'
[git-core/git.git] / builtin / checkout.c
index ea2fe1c..3398c61 100644 (file)
@@ -1110,7 +1110,7 @@ static int checkout_branch(struct checkout_opts *opts,
                char *head_ref = resolve_refdup("HEAD", 0, sha1, &flag);
                if (head_ref &&
                    (!(flag & REF_ISSYMREF) || strcmp(head_ref, new->path)))
-                       die_if_checked_out(new->path);
+                       die_if_checked_out(new->path, 1);
                free(head_ref);
        }