From 117e8b6037ea48b8c72a72970f85ed6ed8530285 Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Wed, 19 Oct 2011 23:44:42 +0200 Subject: [PATCH] repack_without_ref(): remove temporary Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- refs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/refs.c b/refs.c index f6752a489d..431d3c661d 100644 --- a/refs.c +++ b/refs.c @@ -1190,12 +1190,10 @@ static struct lock_file packlock; static int repack_without_ref(const char *refname) { struct ref_array *packed; - struct ref_entry *ref; int fd, i; packed = get_packed_refs(get_ref_cache(NULL)); - ref = search_ref_array(packed, refname); - if (ref == NULL) + if (search_ref_array(packed, refname) == NULL) return 0; fd = hold_lock_file_for_update(&packlock, git_path("packed-refs"), 0); if (fd < 0) { @@ -1206,8 +1204,7 @@ static int repack_without_ref(const char *refname) for (i = 0; i < packed->nr; i++) { char line[PATH_MAX + 100]; int len; - - ref = packed->refs[i]; + struct ref_entry *ref = packed->refs[i]; if (!strcmp(refname, ref->name)) continue;