Commit 356b891e3ec53ed937db38b6827c6045fc1beff4

Carlos Martín Nieto 2014-07-11T14:19:35

Merge pull request #2468 from Airbitz/pack-error-reporting Properly report failure when expanding a packfile

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/indexer.c b/src/indexer.c
index 8daff3d..010de32 100644
--- a/src/indexer.c
+++ b/src/indexer.c
@@ -460,7 +460,7 @@ static int append_to_pack(git_indexer *idx, const void *data, size_t size)
 
 	/* add the extra space we need at the end */
 	if (p_ftruncate(idx->pack->mwf.fd, current_size + size) < 0) {
-		giterr_system_set(errno);
+		giterr_set(GITERR_OS, "Failed to increase size of pack file '%s'", idx->pack->pack_name);
 		return -1;
 	}