Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/odb.c
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2013-08-30 18:31:52 +0400
committernulltoken <emeric.fermas@gmail.com>2013-08-31 01:19:02 +0400
commita12e069a3e904728d55dc5c92094b0a5cee63da2 (patch)
tree4219feb4e8d7965c380f801dd26453dc8ed0a2da /src/odb.c
parent19b9a0920987f07d05040b3a067b1599e38f6013 (diff)
odb: Honor the non refreshing capability of a backend
Diffstat (limited to 'src/odb.c')
-rw-r--r--src/odb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/odb.c b/src/odb.c
index 21b46bf56..9785c74da 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -622,7 +622,7 @@ attempt_lookup:
backend_internal *internal = git_vector_get(&db->backends, i);
git_odb_backend *b = internal->backend;
- if (b->exists != NULL)
+ if (b->exists != NULL && (!refreshed || b->refresh))
found = b->exists(b, id);
}
@@ -717,7 +717,7 @@ attempt_lookup:
backend_internal *internal = git_vector_get(&db->backends, i);
git_odb_backend *b = internal->backend;
- if (b->read != NULL) {
+ if (b->read != NULL && (!refreshed || b->refresh)) {
++reads;
error = b->read(&raw.data, &raw.len, &raw.type, b, id);
}
@@ -774,7 +774,7 @@ attempt_lookup:
backend_internal *internal = git_vector_get(&db->backends, i);
git_odb_backend *b = internal->backend;
- if (b->read_prefix != NULL) {
+ if (b->read_prefix != NULL && (!refreshed || b->refresh)) {
git_oid full_oid;
error = b->read_prefix(&full_oid, &raw.data, &raw.len, &raw.type, b, short_id, len);
if (error == GIT_ENOTFOUND || error == GIT_PASSTHROUGH)