Skip to content

Commit 531e6da

Browse files
j6tgitster
authored andcommitted
prune-packed: advanced progress even for non-existing fan-out directories
A progress indicator is used to count through the 256 object fan-out directories while unused object files are removed. (However, it becomes visible only if this process takes long enough.) Previously, display_progress() was only called if object files were actually removed. But if directories towards the end (fd/, fe/, ff/) did not exist, this could leave a strange line Removing duplicate objects: 99% (255/256), done. in the terminal instead of the expected "100% (256/256)". Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 95110d7 commit 531e6da

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

builtin-prune-packed.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ void prune_packed_objects(int opts)
5555
for (i = 0; i < 256; i++) {
5656
DIR *d;
5757

58+
display_progress(progress, i + 1);
5859
sprintf(pathname + len, "%02x/", i);
5960
d = opendir(pathname);
6061
if (!d)

0 commit comments

Comments
 (0)