Commit 0309e85045bfb143c172b3342293d98d687e8092

Vicent Martí 2013-02-21T09:05:48

Merge pull request #1352 from ethomson/reuc_sort add a sorter to the reuc on index creation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/index.c b/src/index.c
index 25156d0..5964908 100644
--- a/src/index.c
+++ b/src/index.c
@@ -275,7 +275,8 @@ int git_index_open(git_index **index_out, const char *index_path)
 			index->on_disk = 1;
 	}
 
-	if (git_vector_init(&index->entries, 32, index_cmp) < 0)
+	if (git_vector_init(&index->entries, 32, index_cmp) < 0 ||
+		git_vector_init(&index->reuc, 32, reuc_cmp) < 0)
 		return -1;
 
 	index->entries_cmp_path = index_cmp_path;