aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-05-21 04:02:15 -0700
committerJunio C Hamano <gitster@pobox.com>2010-05-21 04:02:15 -0700
commitaf655431f53c20e3d0ed236544397c69974267f4 (patch)
treeddfc95bd3f768e98709cc2d7a445e64117d4c784 /builtin
parent78f17935a306dfd7a1f32c923e0b05a094bf0c25 (diff)
parent63a2f6139c33b7231baad8e3bfcc218ef6b63418 (diff)
downloadgit-af655431f53c20e3d0ed236544397c69974267f4.tar.gz
git-af655431f53c20e3d0ed236544397c69974267f4.tar.xz
Merge branch 'sr/remote-helper-export'
* sr/remote-helper-export: t5800: testgit helper requires Python support Makefile: Simplify handling of python scripts remote-helpers: add tests for testgit helper remote-helpers: add testgit helper remote-helpers: add support for an export command remote-helpers: allow requesing the path to the .git directory fast-import: always create marks_file directories clone: also configure url for bare clones clone: pass the remote name to remote_get Conflicts: Makefile
Diffstat (limited to 'builtin')
-rw-r--r--builtin/clone.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index 0bedde41f..445792242 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -474,9 +474,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
*/
unsetenv(CONFIG_ENVIRONMENT);
- if (option_reference)
- setup_reference(git_dir);
-
git_config(git_default_config, NULL);
if (option_bare) {
@@ -502,12 +499,15 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
git_config_set(key.buf, "true");
strbuf_reset(&key);
}
-
- strbuf_addf(&key, "remote.%s.url", option_origin);
- git_config_set(key.buf, repo);
- strbuf_reset(&key);
}
+ strbuf_addf(&key, "remote.%s.url", option_origin);
+ git_config_set(key.buf, repo);
+ strbuf_reset(&key);
+
+ if (option_reference)
+ setup_reference(git_dir);
+
fetch_pattern = value.buf;
refspec = parse_fetch_refspec(1, &fetch_pattern);
@@ -517,7 +517,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
refs = clone_local(path, git_dir);
mapped_refs = wanted_peer_refs(refs, refspec);
} else {
- struct remote *remote = remote_get(argv[0]);
+ struct remote *remote = remote_get(option_origin);
transport = transport_get(remote, remote->url[0]);
if (!transport->get_refs_list || !transport->fetch)