summaryrefslogtreecommitdiff
path: root/walker.c
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2008-10-18 08:44:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-10-18 13:53:47 (GMT)
commit59c69c0c656ebce2f7ce870b4913512597a98390 (patch)
treef2bcd14377a483929861a09cf929286da0f1700a /walker.c
parentb0b44bc7b26c8c4b4221a377ce6ba174b843cb8d (diff)
downloadgit-59c69c0c656ebce2f7ce870b4913512597a98390.zip
git-59c69c0c656ebce2f7ce870b4913512597a98390.tar.gz
git-59c69c0c656ebce2f7ce870b4913512597a98390.tar.bz2
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>
Diffstat (limited to 'walker.c')
-rw-r--r--walker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/walker.c b/walker.c
index 6b4cf70..679adab 100644
--- a/walker.c
+++ b/walker.c
@@ -191,7 +191,7 @@ static int interpret_target(struct walker *walker, char *target, unsigned char *
if (!get_sha1_hex(target, sha1))
return 0;
if (!check_ref_format(target)) {
- struct ref *ref = alloc_ref_from_str(target);
+ struct ref *ref = alloc_ref(target);
if (!walker->fetch_ref(walker, ref)) {
hashcpy(sha1, ref->old_sha1);
free(ref);