Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]>
---
builtin/checkout.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 4fbb9c1..3dc416c 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -861,6 +861,8 @@ static int prepare_linked_checkout(const struct
checkout_opts *opts,
if (!new->commit)
die(_("no branch specified"));
+ if (file_exists(path))
+ die(_("%s already exists"), path);
len = strlen(path);
while (len && is_dir_sep(path[len - 1]))
--
2.1.0.rc0.78.gc0d8480
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html