OSDN Git Service
(root)
/
git-core
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'nd/worktree-various-heads'
[git-core/git.git]
/
builtin
/
checkout.c
diff --git
a/builtin/checkout.c
b/builtin/checkout.c
index
ea2fe1c
..
3398c61
100644
(file)
--- a/
builtin/checkout.c
+++ b/
builtin/checkout.c
@@
-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);
}