summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/clone.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index 258bfd65b7..78364a0861 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -1012,6 +1012,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
if (!option_origin)
option_origin = "origin";
+ if (!valid_remote_name(option_origin))
+ die(_("'%s' is not a valid remote name"), option_origin);
+
repo_name = argv[0];
path = get_repo_path(repo_name, &is_bundle);