Commit dfec726bbae0e699b78db8f1b63372134c8467a6

Vicent Marti 2013-05-03T23:30:54

odb: Do not error out if an alternate ODB is missing

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/odb.c b/src/odb.c
index 07e1ea6..7b5e555 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -457,6 +457,9 @@ static int add_default_backends(
 	inode = 0;
 #else
 	if (p_stat(objects_dir, &st) < 0) {
+		if (as_alternates)
+			return 0;
+
 		giterr_set(GITERR_ODB, "Failed to load object database in '%s'", objects_dir);
 		return -1;
 	}