X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=unpack-objects.c;h=19874d004a03531b12922f1bd48a28f18e8d2897;hb=12dd6e8cb0643231628d0240fdbb4afdef6629ea;hp=355889f65bef73e512cf4c053493ae25c6a77b96;hpb=d36f7b805eccaf702c0be1c00d034711d0da1f77;p=git.git diff --git a/unpack-objects.c b/unpack-objects.c index 355889f6..19874d00 100644 --- a/unpack-objects.c +++ b/unpack-objects.c @@ -211,7 +211,7 @@ static void unpack_one(unsigned nr, unsigned total) 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) { @@ -255,7 +255,7 @@ static void unpack_all(void) 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"); }