summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 064d51d)
raw | patch | inline | side by side (parent: 064d51d)
author | Michael Haggerty <mhagger@alum.mit.edu> | |
Mon, 12 Dec 2011 05:38:21 +0000 (06:38 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 12 Dec 2011 17:08:53 +0000 (09:08 -0800) |
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c | patch | blob | history |
index ba7a8b020b64db9699de8a201f6898c9c3a639e5..2e7bc0c5c1bd188b936b2e1ed355c17e4b38c500 100644 (file)
--- a/refs.c
+++ b/refs.c
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) {
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;