Commit a34692c41921c97fd75f6f19fc1549f8abe38c1e

Carlos Martín Nieto 2015-03-13T18:00:15

indexer: set an error message on duplicate objects in pack While this is not even close to a fix, we can at least set an error message so we know which error we are facing. Up to know we just returned an error without a message.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/indexer.c b/src/indexer.c
index 92f85c1..f328025 100644
--- a/src/indexer.c
+++ b/src/indexer.c
@@ -289,6 +289,7 @@ static int store_object(git_indexer *idx)
 	k = kh_put(oid, idx->pack->idx_cache, &pentry->sha1, &error);
 	if (!error) {
 		git__free(pentry);
+		giterr_set(GITERR_INDEXER, "cannot handle duplicate objects in pack");
 		goto on_error;
 	}