summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4bc5fbf)
raw | patch | inline | side by side (parent: 4bc5fbf)
author | Linus Torvalds <torvalds@g5.osdl.org> | |
Sun, 10 Jul 2005 23:14:22 +0000 (16:14 -0700) | ||
committer | Linus Torvalds <torvalds@g5.osdl.org> | |
Sun, 10 Jul 2005 23:14:22 +0000 (16:14 -0700) |
We used to print the index of the object we unpacked, not how many we
had unpacked. Which caused slightly confusing progress reports like
100% (2/3) done
rather than the more obvious "3/3" for 100% ;)
had unpacked. Which caused slightly confusing progress reports like
100% (2/3) done
rather than the more obvious "3/3" for 100% ;)
unpack-objects.c | patch | blob | history |
diff --git a/unpack-objects.c b/unpack-objects.c
index 355889f65bef73e512cf4c053493ae25c6a77b96..19874d004a03531b12922f1bd48a28f18e8d2897 100644 (file)
--- a/unpack-objects.c
+++ b/unpack-objects.c
static unsigned long last_sec;
static unsigned last_percent;
struct timeval now;
- unsigned percentage = ((1+nr) * 100) / total;
+ unsigned percentage = (nr * 100) / total;
gettimeofday(&now, NULL);
if (percentage != last_percent || now.tv_sec != last_sec) {
use(sizeof(struct pack_header));
for (i = 0; i < nr_objects; i++)
- unpack_one(i, nr_objects);
+ unpack_one(i+1, nr_objects);
if (delta_list)
die("unresolved deltas left after unpacking");
}