Browse Source

clone: also configure url for bare clones

Without this the 'origin' remote would not be configured, so when
calling remote_get with 'origin' as argument we would get an
unconfigured remote.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Sverre Rabbelier 15 years ago committed by Junio C Hamano
parent
commit
df61c88979
  1. 8
      builtin/clone.c

8
builtin/clone.c

@ -495,12 +495,12 @@ int cmd_clone(int argc, const char **argv, const char *prefix) @@ -495,12 +495,12 @@ 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);


Loading…
Cancel
Save