author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Sat, 18 Oct 2008 08:37:40 +0000 (10:37 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 18 Oct 2008 13:53:46 +0000 (06:53 -0700) | ||
commit | 8009768e89dfe389327654cf9d6868f680ef1f40 | |
tree | 78dba56a26443c2da7a2f263a2470a24443c5bf5 | tree | snapshot |
parent | 46dc1b0e332612aa32c139007fa33f4b429de9d1 | commit | diff |
add alloc_ref_with_prefix()
In three cases in remote.c, a "raw" ref is allocated using alloc_ref()
and then its is constructed using sprintf(). Clean it up by adding a
helper function, alloc_ref_with_prefix(), which creates a composite
name. Use it in alloc_ref_from_str(), too, as it simplifies the code.
Open code alloc_ref() in alloc_ref_with_prefix(), as the former is
going to be removed in the patch after the next.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
In three cases in remote.c, a "raw" ref is allocated using alloc_ref()
and then its is constructed using sprintf(). Clean it up by adding a
helper function, alloc_ref_with_prefix(), which creates a composite
name. Use it in alloc_ref_from_str(), too, as it simplifies the code.
Open code alloc_ref() in alloc_ref_with_prefix(), as the former is
going to be removed in the patch after the next.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c | diff | blob | history |