struct ref *ref;
struct object *obj;
- ref = alloc_ref(strlen(refname) + 1);
- strcpy(ref->name, refname);
+ ref = alloc_ref_from_str(refname);
if (http_fetch_ref(remote->url, ref) != 0) {
fprintf(stderr,
char *ref_info;
struct ref *ref;
- ref = alloc_ref(strlen(ls->dentry_name) + 1);
- strcpy(ref->name, ls->dentry_name);
+ ref = alloc_ref_from_str(ls->dentry_name);
if (http_fetch_ref(remote->url, ref) != 0) {
fprintf(stderr,