fetch: inpsect for Cache
Add debugging code for inspecting the in-memory Refdb of the Cache. Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett
This commit is contained in:
parent
0640ea59ec
commit
559f84d9f1
|
|
@ -66,7 +66,7 @@ impl Refdb {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub(crate) fn print(&self) {
|
pub(crate) fn inspect(&self) {
|
||||||
if self.0.is_empty() {
|
if self.0.is_empty() {
|
||||||
println!("Refdb is empty!");
|
println!("Refdb is empty!");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -505,6 +505,11 @@ impl<'a, S> Cached<'a, S> {
|
||||||
Some(tip) => SignedRefsAt::load_at(*tip, *remote, &self.handle.repo).map(Some),
|
Some(tip) => SignedRefsAt::load_at(*tip, *remote, &self.handle.repo).map(Some),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub(crate) fn inspect(&self) {
|
||||||
|
self.state.refs.inspect()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, S> RemoteRepository for Cached<'a, S> {
|
impl<'a, S> RemoteRepository for Cached<'a, S> {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue