{"thread":{"id":"10511","subject":"[PATCH 2/2] add throughput display to index-pack","startedAt":"2007-10-29T23:25:47Z","lastAt":"2007-10-29T23:25:47Z","messageCount":1,"participants":["Nicolas Pitre"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"57496","messageId":"alpine.LFD.0.9999.0710291922510.22100@xanadu.home","threadId":"10511","inReplyTo":null,"subject":"[PATCH 2/2] add throughput display to index-pack","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-10-29T23:25:47Z","receivedAt":"2007-10-29T23:25:47Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"... and call it \"Receiving objects\" when over stdin to look clearer\nto end users.\n\nSigned-off-by: Nicolas Pitre <nico@cam.org>\n---\n\ndiff --git a/index-pack.c b/index-pack.c\nindex 2f149a4..d32c7b9 100644\n--- a/index-pack.c\n+++ b/index-pack.c\n@@ -87,6 +87,8 @@ static void *fill(int min)\n \t\t\t\tdie(\"early EOF\");\n \t\t\tdie(\"read error on input: %s\", strerror(errno));\n \t\t}\n+\t\tif (verbose && from_stdin)\n+\t\t\tdisplay_throughput(&progress, ret);\n \t\tinput_len += ret;\n \t} while (input_len < min);\n \treturn input_buffer;\n@@ -406,7 +408,9 @@ static void parse_pack_objects(unsigned char *sha1)\n \t * - remember base (SHA1 or offset) for all deltas.\n \t */\n \tif (verbose)\n-\t\tstart_progress(&progress, \"Indexing objects\", nr_objects);\n+\t\tstart_progress(&progress,\n+\t\t\t       from_stdin ? \"Receiving objects\" : \"Indexing objects\",\n+\t\t\t       nr_objects);\n \tfor (i = 0; i < nr_objects; i++) {\n \t\tstruct object_entry *obj = &objects[i];\n \t\tdata = unpack_raw_entry(obj, &delta->base);\n"}]}