diff options
Diffstat (limited to 'builtin/clone.c')
-rw-r--r-- | builtin/clone.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/builtin/clone.c b/builtin/clone.c index b087ee40c2..fbfd6568cd 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -953,7 +953,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix) struct ref *mapped_refs; const struct ref *ref; struct strbuf key = STRBUF_INIT; - struct strbuf default_refspec = STRBUF_INIT; struct strbuf branch_top = STRBUF_INIT, reflog_msg = STRBUF_INIT; struct transport *transport = NULL; const char *src_ref_prefix = "refs/heads/"; @@ -1157,9 +1156,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix) remote = remote_get(option_origin); - strbuf_addf(&default_refspec, "+%s*:%s*", src_ref_prefix, - branch_top.buf); - refspec_append(&remote->fetch, default_refspec.buf); + refspec_appendf(&remote->fetch, "+%s*:%s*", src_ref_prefix, + branch_top.buf); transport = transport_get(remote, remote->url[0]); transport_set_verbosity(transport, option_verbosity, option_progress); @@ -1332,7 +1330,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix) strbuf_release(&reflog_msg); strbuf_release(&branch_top); strbuf_release(&key); - strbuf_release(&default_refspec); junk_mode = JUNK_LEAVE_ALL; strvec_clear(&ref_prefixes); |