Skip to content

Commit fe9c7b7

Browse files
mhaggergitster
authored andcommitted
repack_without_ref(): remove temporary
Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 064d51d commit fe9c7b7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

refs.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,12 +1278,10 @@ static struct lock_file packlock;
12781278
static int repack_without_ref(const char *refname)
12791279
{
12801280
struct ref_array *packed;
1281-
struct ref_entry *ref;
12821281
int fd, i;
12831282

12841283
packed = get_packed_refs(get_ref_cache(NULL));
1285-
ref = search_ref_array(packed, refname);
1286-
if (ref == NULL)
1284+
if (search_ref_array(packed, refname) == NULL)
12871285
return 0;
12881286
fd = hold_lock_file_for_update(&packlock, git_path("packed-refs"), 0);
12891287
if (fd < 0) {
@@ -1294,8 +1292,7 @@ static int repack_without_ref(const char *refname)
12941292
for (i = 0; i < packed->nr; i++) {
12951293
char line[PATH_MAX + 100];
12961294
int len;
1297-
1298-
ref = packed->refs[i];
1295+
struct ref_entry *ref = packed->refs[i];
12991296

13001297
if (!strcmp(refname, ref->name))
13011298
continue;

0 commit comments

Comments
 (0)