Commit 0f5520f73aeda936f67024411b9c1b34bb09d6ac

Ben Straub 2012-11-12T07:55:09

Fix error check

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/transports/local.c b/src/transports/local.c
index 436ac43..2e02bd9 100644
--- a/src/transports/local.c
+++ b/src/transports/local.c
@@ -313,7 +313,7 @@ static int local_download_pack(
 
 			/* Add the commit and its tree */
 			if ((error = git_packbuilder_insert(pack, &oid, NULL)) < 0 ||
-				 (error = git_packbuilder_insert_tree(pack, tree_oid)))
+				 (error = git_packbuilder_insert_tree(pack, tree_oid)) < 0)
 				goto cleanup;
 		}
 	}