make alloc_ref_from_str() the new alloc_ref()
With all calls to alloc_ref() gone, we can remove it and then we're free to give alloc_ref_from_str() the shorter name. It's a much nicer interface, as the callers always need to have a name string when they allocate a ref anyway and don't need to calculate and pass its length+1 any more. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
b0b44bc7b2
commit
59c69c0c65
@ -521,8 +521,8 @@ static void find_non_local_tags(struct transport *transport,
|
||||
will_fetch(head, ref->old_sha1))) {
|
||||
string_list_insert(ref_name, &new_refs);
|
||||
|
||||
rm = alloc_ref_from_str(ref_name);
|
||||
rm->peer_ref = alloc_ref_from_str(ref_name);
|
||||
rm = alloc_ref(ref_name);
|
||||
rm->peer_ref = alloc_ref(ref_name);
|
||||
hashcpy(rm->old_sha1, ref_sha1);
|
||||
|
||||
**tail = rm;
|
||||
|
||||
Reference in New Issue
Block a user