Commit b36cc7a4013a47856dade4226edc657906b82431

Anders Borum 2018-09-27T11:18:00

fix check if blob is uninteresting when inserting tree to packbuilder Blobs that have been marked as uninteresting should not be inserted into packbuilder when inserting a tree. The check as to whether a blob was uninteresting looked at the status for the tree itself instead of the blob. This could cause significantly larger packfiles.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/pack-objects.c b/src/pack-objects.c
index 2b786df..58eaac6 100644
--- a/src/pack-objects.c
+++ b/src/pack-objects.c
@@ -1676,7 +1676,7 @@ int insert_tree(git_packbuilder *pb, git_tree *tree)
 
 			break;
 		case GIT_OBJ_BLOB:
-			if ((error = retrieve_object(&obj, pb, git_tree_id(tree))) < 0)
+			if ((error = retrieve_object(&obj, pb, entry_id)) < 0)
 				return error;
 			if (obj->uninteresting)
 				continue;