diff options
Diffstat (limited to 'src/clone.c')
-rw-r--r-- | src/clone.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/clone.c b/src/clone.c index 60525939f..cad9ea1dc 100644 --- a/src/clone.c +++ b/src/clone.c @@ -306,8 +306,10 @@ static int create_and_configure_origin( { int error; git_remote *origin = NULL; + const char *name; - if ((error = git_remote_create(&origin, repo, "origin", url)) < 0) + name = options->remote_name ? options->remote_name : "origin"; + if ((error = git_remote_create(&origin, repo, name, url)) < 0) goto on_error; if (options->ignore_cert_errors) |