Commit Diff


commit - a605f678a4427d849df6c8fb3d4c316fdecee768
commit + 857fde73cee7d4df6f410f2bdfa837b17b78d3ec
blob - 083f5181110da578dfb7efe24a2965a853ec74cd
blob + 74811470eff0f6d9a213faf7d3d7a576fda88883
--- lib/pack_create.c
+++ lib/pack_create.c
@@ -927,13 +927,16 @@ load_tree_entries(struct got_object_id_queue *ids, int
 		} else if (S_ISREG(mode) || S_ISLNK(mode)) {
 			err = add_object(want_meta, idset, id, p,
 			    GOT_OBJ_TYPE_BLOB, mtime, loose_obj_only, repo);
-			if (err)
-				break;
-			(*nfound)++;
-			err = report_progress(progress_cb, progress_arg, rl,
-			    *ncolored, *nfound, *ntrees, 0L, 0, 0, 0, 0);
 			if (err)
 				break;
+			if (want_meta) {
+				(*nfound)++;
+				err = report_progress(progress_cb, progress_arg,
+				    rl, *ncolored, *nfound, *ntrees,
+				    0L, 0, 0, 0, 0);
+				if (err)
+					break;
+			}
 		}
 		free(p);
 		p = NULL;
@@ -988,12 +991,14 @@ load_tree(int want_meta, struct got_object_idset *idse
 			break;
 		}
 
-		(*nfound)++;
-		err = report_progress(progress_cb, progress_arg, rl,
-		    *ncolored, *nfound, *ntrees, 0L, 0, 0, 0, 0);
-		if (err)
-			break;
-
+		if (want_meta) {
+			(*nfound)++;
+			err = report_progress(progress_cb, progress_arg, rl,
+			    *ncolored, *nfound, *ntrees, 0L, 0, 0, 0, 0);
+			if (err)
+				break;
+		}
+	
 		err = load_tree_entries(&tree_ids, want_meta, idset, qid->id,
 		    dpath, mtime, repo, loose_obj_only, ncolored, nfound,
 		    ntrees, progress_cb, progress_arg, rl,
@@ -1039,11 +1044,13 @@ load_commit(int want_meta, struct got_object_idset *id
 	if (err)
 		goto done;
 
-	(*nfound)++;
-	err = report_progress(progress_cb, progress_arg, rl,
-	    *ncolored, *nfound, *ntrees, 0L, 0, 0, 0, 0);
-	if (err)
-		goto done;
+	if (want_meta) {
+		(*nfound)++;
+		err = report_progress(progress_cb, progress_arg, rl,
+		    *ncolored, *nfound, *ntrees, 0L, 0, 0, 0, 0);
+		if (err)
+			goto done;
+	}
 
 	err = load_tree(want_meta, idset, got_object_commit_get_tree_id(commit),
 	    "", got_object_commit_get_committer_time(commit),
@@ -1086,11 +1093,13 @@ load_tag(int want_meta, struct got_object_idset *idset
 	if (err)
 		goto done;
 
-	(*nfound)++;
-	err = report_progress(progress_cb, progress_arg, rl,
-	    *ncolored, *nfound, *ntrees, 0L, 0, 0, 0, 0);
-	if (err)
-		goto done;
+	if (want_meta) {
+		(*nfound)++;
+		err = report_progress(progress_cb, progress_arg, rl,
+		    *ncolored, *nfound, *ntrees, 0L, 0, 0, 0, 0);
+		if (err)
+			goto done;
+	}
 
 	switch (got_object_tag_get_object_type(tag)) {
 	case GOT_OBJ_TYPE_COMMIT: