git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 2/4] progress: fix progress meters when dealing with lots of work

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Nov 13, 2017, 20:28 UTC
Message-ID
<20171113122834.20a69d1e87defe95d6e0e8ed@google.com>
In-Reply-To
<20171113201600.24878-3-newren@gmail.com>

On Mon, 13 Nov 2017 12:15:58 -0800 Elijah Newren <newren@gmail.com> wrote:

Show 11 quoted lines
> 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@gmail.com>
> ---
> This does imply 64-bit math for all progress operations.  Possible alternatives
> I could think of listed at
> https://public-inbox.org/git/CABPp-BH1Cpc9UfYpmBBAHWSqadg=QuD=28qx1oV29ZdvF4NbJw@mail.gmail.com/
> 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 me.

Previous: Elijah NewrenNext: Jonathan Tan
Message 5 of 8 in “Fix issues with rename detection limits”
  1. 0/4 Fix issues with rename detection limitsElijah Newren, Nov 13, 2017
  2. 1/4 sequencer: warn when internal merge may be suboptimal due to renameLimitElijah Newren, Nov 13, 2017
  3. 3/4 Remove silent clamp of renameLimitElijah Newren, Nov 13, 2017
  4. 2/4 progress: fix progress meters when dealing with lots of workElijah Newren, Nov 13, 2017
  5. Jonathan TanNov 13, 2017
  6. Jonathan TanNov 13, 2017
  7. Elijah NewrenNov 13, 2017
  8. 4/4 sequencer: show rename progress during cherry picksElijah Newren, Nov 13, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.