diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
index 85522edc49a9cbe4d43282d9c8a119d03441b860..7c113d65f67cf9c9520fd797cb0d7b522dfe4643 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
@@ -823,11 +823,15 @@ private void checkConnectivity() throws IOException {
 
 		RevObject o;
 		while ((o = ow.nextObject()) != null) {
+			if (ensureObjectsProvidedVisible) {
+				if (providedObjects.contains(o))
+					continue;
+				else
+					throw new MissingObjectException(o, o.getType());
+			}
+
 			if (o instanceof RevBlob && !db.hasObject(o))
 				throw new MissingObjectException(o, Constants.TYPE_BLOB);
-
-			if (ensureObjectsProvidedVisible && !providedObjects.contains(o))
-				throw new MissingObjectException(o, o.getType());
 		}
 	}