Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
clear_packed_ref_cache(): take a `packed_ref_store *` parameter
author
Michael Haggerty
<mhagger@alum.mit.edu>
Fri, 23 Jun 2017 07:01:24 +0000
(09:01 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 23 Jun 2017 20:27:32 +0000
(13:27 -0700)
It only cares about the packed-refs part of the reference store.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/files-backend.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
139c459
)
diff --git
a/refs/files-backend.c
b/refs/files-backend.c
index de8293493f92ae6a95850f8527461dd8cc949ad9..2b0db60b2b648c9b600384afd90838437227f886 100644
(file)
--- a/
refs/files-backend.c
+++ b/
refs/files-backend.c
@@
-120,15
+120,15
@@
static int release_packed_ref_cache(struct packed_ref_cache *packed_refs)
}
}
}
}
-static void clear_packed_ref_cache(struct
files
_ref_store *refs)
+static void clear_packed_ref_cache(struct
packed
_ref_store *refs)
{
{
- if (refs->
packed_ref_store->
cache) {
- struct packed_ref_cache *
packed_refs = refs->packed_ref_store
->cache;
+ if (refs->cache) {
+ struct packed_ref_cache *
cache = refs
->cache;
- if (is_lock_file_locked(&refs->
packed_ref_store->
lock))
+ if (is_lock_file_locked(&refs->lock))
die("BUG: packed-ref cache cleared while locked");
die("BUG: packed-ref cache cleared while locked");
- refs->
packed_ref_store->
cache = NULL;
- release_packed_ref_cache(
packed_refs
);
+ refs->cache = NULL;
+ release_packed_ref_cache(
cache
);
}
}
}
}
@@
-401,7
+401,7
@@
static void validate_packed_ref_cache(struct files_ref_store *refs)
if (refs->packed_ref_store->cache &&
!stat_validity_check(&refs->packed_ref_store->cache->validity,
refs->packed_ref_store->path))
if (refs->packed_ref_store->cache &&
!stat_validity_check(&refs->packed_ref_store->cache->validity,
refs->packed_ref_store->path))
- clear_packed_ref_cache(refs);
+ clear_packed_ref_cache(refs
->packed_ref_store
);
}
/*
}
/*
@@
-1435,7
+1435,7
@@
static void rollback_packed_refs(struct files_ref_store *refs)
die("BUG: packed-refs not locked");
rollback_lock_file(&refs->packed_ref_store->lock);
release_packed_ref_cache(packed_ref_cache);
die("BUG: packed-refs not locked");
rollback_lock_file(&refs->packed_ref_store->lock);
release_packed_ref_cache(packed_ref_cache);
- clear_packed_ref_cache(refs);
+ clear_packed_ref_cache(refs
->packed_ref_store
);
}
struct ref_to_prune {
}
struct ref_to_prune {