Commit 530594c0aa04df31e3cef331f6dad8083f66f15d

Carlos Martín Nieto 2014-05-23T05:53:41

odb: clear backend errors on successful read We go through the different backends in order, so it's not an error if at least one of the backends has the data we want.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/odb.c b/src/odb.c
index 20a3f6c..a4fc026 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -783,6 +783,7 @@ int git_odb_read(git_odb_object **out, git_odb *db, const git_oid *id)
 		return error;
 	}
 
+	giterr_clear();
 	if ((object = odb_object__alloc(id, &raw)) == NULL)
 		return -1;