Commit dbe266a4450f73d753bf746c8343ca4c7dc41d18

Stefan Sperling 2022-01-05T20:24:13

print status output even if 'gotadmin cleanup' finds no objects to remove

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/lib/repository_admin.c b/lib/repository_admin.c
index 8b113eb..f9be16f 100644
--- a/lib/repository_admin.c
+++ b/lib/repository_admin.c
@@ -1138,6 +1138,11 @@ got_repo_purge_unreferenced_loose_objects(struct got_repository *repo,
 	nloose = got_object_idset_num_elements(loose_ids);
 	if (nloose == 0) {
 		got_object_idset_free(loose_ids);
+		if (progress_cb) {
+			err = progress_cb(progress_arg, 0, 0, 0);
+			if (err)
+				return err;
+		}
 		return NULL;
 	}