Re: [PATCH v2 2/4] progress: fix progress meters when dealing with lots of work
- Date: Mon, 13 Nov 2017 12:28:34 -0800
- From: Jonathan Tan <jonathantanmy@xxxxxxxxxx>
- Subject: Re: [PATCH v2 2/4] progress: fix progress meters when dealing with lots of work
On Mon, 13 Nov 2017 12:15:58 -0800
Elijah Newren <newren@xxxxxxxxx> wrote:
> The possibility of setting merge.renameLimit beyond 2^16 raises the
> possibility that the values passed to progress can exceed 2^32.
> Use uint64_t, because it "ought to be enough for anybody". :-)
> Signed-off-by: Elijah Newren <newren@xxxxxxxxx>
> This does imply 64-bit math for all progress operations. Possible alternatives
> I could think of listed at
> Opinions of others on whether 64-bit is okay, or preference for which alternative
> is picked?
I haven't looked into this in much detail, but another alternative to
consider is to use size_t everywhere. This also allows us to use st_add
and st_mult, which checks overflow for us.
Changing progress to use the size_t of the local machine makes sense to