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

Re: sb/submodule-parallel-fetch, was: Re: What's cooking in git.git (Dec 2015, #03; Thu, 10)

From
Stefan Beller <sbeller@google.com>
Date
Dec 11, 2015, 22:52 UTC
Message-ID
<CAGZ79kYOtoWHCzpeHGrCEjTUuKYB3rogfV2dxL_TL5Pcu59RSg@mail.gmail.com>
In-Reply-To
<566B4207.8020009@kdbg.org>
On Fri, Dec 11, 2015 at 1:37 PM, Johannes Sixt <j6t@kdbg.org> wrote:
>
> Generally, I'm already quite satisfied with the state of the
> infrastructure at the tip of the branch.
>
I was about the rework the patch series.
> Nevertheless, I have a few niggles.

If you don't mind I'll split your patch into chunks and squash these where appropriate and resend the series with the suggestions included without the intermediate stages of non compiling code for Windows.

Show 9 quoted lines
>
> The primary one is that we are using a global variable of type
> struct parallel_processes to keep track of the processes. Fortunately,
> most functions already take a pointer (I gather you did anticipate an
> object oriented use of the functions). The only exception is pp_init():
> It returns a pointer to the global object, which is then passed around
> to the other functions. This does not conform to our usual style,
> however, where the initializer function takes a pointer to the object,
> too.

Noted. I thought about the init function as a constructor, such as

    foo *pp = new foo();

in C++ would be just syntactic sugar for what I did there. I'll adhere to Git style then instead.

Show 17 quoted lines
>
> After converting pp_init, we can have a nicely object oriented
> collection of functions and get rid of the global object ... almost.
>
> We still need a global variable for the signal handler. But since
> signals and their handlers are a global resource, it is not that bad to
> have a global variable that is dedicated to signal handling.
>
> Another small nit is that I found it confusing that the closure
> parameters are arranged differently in the callback functions. Granted,
> in get_next_task one of them is an out parameter, but that is actually
> an argument to move it to the end of the parameter list, IMHO.
>
> On top of that I found an error or two in the documentation, and I have
> a few suggestions for improvements.
>
> All this is summarized in the patch below.
Thanks for the improvements!
Stefan
Previous: Johannes SixtNext: Junio C Hamano
Message 8 of 13 in “What's cooking in git.git (Dec 2015, #03; Thu, 10)”
  1. Junio C HamanoDec 10, 2015
  2. Stefan BellerDec 10, 2015
  3. Junio C HamanoDec 10, 2015
  4. Junio C HamanoDec 10, 2015
  5. Stefan BellerDec 10, 2015
  6. Junio C HamanoDec 11, 2015
  7. sb/submodule-parallel-fetch, was: Re: What's cooking in git.git (Dec 2015, #03; Thu, 10)Johannes Sixt, Dec 11, 2015
  8. Stefan BellerDec 11, 2015
  9. Junio C HamanoDec 11, 2015
  10. Stefan BellerDec 14, 2015
  11. Johannes SixtDec 11, 2015
  12. John KeepingDec 11, 2015
  13. Junio C HamanoDec 11, 2015

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.