{"thread":{"id":"19068","subject":"[PATCH] prune-packed: advanced progress even for non-existing fan-out directories","startedAt":"2009-04-27T07:44:58Z","lastAt":"2009-04-27T07:44:58Z","messageCount":1,"participants":["Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"112347","messageId":"1240818298-22179-1-git-send-email-j6t@kdbg.org","threadId":"19068","inReplyTo":null,"subject":"[PATCH] prune-packed: advanced progress even for non-existing fan-out directories","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-04-27T07:44:58Z","receivedAt":"2009-04-27T07:44:58Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"A progress indicator is used to count through the 256 object fan-out\ndirectories while unused object files are removed. (However, it becomes\nvisible only if this process takes long enough.)\n\nPreviously, display_progress() was only called if object files were\nactually removed. But if directories towards the end (fd/, fe/, ff/) did\nnot exist, this could leave a strange line\n\n   Removing duplicate objects:  99% (255/256), done.\n\nin the terminal instead of the expected \"100% (256/256)\".\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n builtin-prune-packed.c |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin-prune-packed.c b/builtin-prune-packed.c\nindex 2d5b2cd..4942892 100644\n--- a/builtin-prune-packed.c\n+++ b/builtin-prune-packed.c\n@@ -55,6 +55,7 @@ void prune_packed_objects(int opts)\n \tfor (i = 0; i < 256; i++) {\n \t\tDIR *d;\n \n+\t\tdisplay_progress(progress, i + 1);\n \t\tsprintf(pathname + len, \"%02x/\", i);\n \t\td = opendir(pathname);\n \t\tif (!d)\n-- \n1.6.3.rc1.88.g1bf9\n"}]}