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

Re: [Outreachy][PATCH] promisor-remote: honor promisor.fetchOrder when trying remotes

From
TJTanga Joris <tangajoris@gmail.com>
Date
Nov 5, 2026, 14:30 UTC
Message-ID
<CAKrRMNpAW+f2XXMFqpB8ffZsTdyPsaFtHe8dku=JVXACp1M3Hw@mail.gmail.com>
In-Reply-To
<20261104172434.691381-1-yopatatchou@gmail.com>
Hello Nelly,

Thanks for working on this, being able to choose the order of promisor remotes sounds useful.

I tried your patch on top of master (0ffa3e35c7) in a partial clone, and I think there is a problem when the new variable is set:

  $ git config promisor.fetchOrder origin
  $ git show HEAD:f
  BUG: string-list.c:340: string_list_split_in_place() called with
strdup_strings
On Wed, 4 Nov 2026 at 20:48, Yopa Nelly <yopatatchou@gmail.com> wrote:
Show 6 quoted lines
> +               char *value_copy;
> +
> +               if (!value)
> +                       return config_error_nonbool(var);
> +               value_copy = xstrdup(value);
> +               string_list_split_in_place_f(&fetch_order, value_copy, ",", -1,

Without the variable it works fine. I think this is because fetch_order is created with STRING_LIST_INIT_DUP, but string_list_split_in_place_f() is used on it. Maybe string_list_split_f() would work here instead?

Also, each time the variable is seen the names are added to the same list. The list is never cleared, so values from several config files pile up.

It also looks like the list is file-static, so every repository in the process (for example submodules) shares it, while the rest of the promisor config lives in each repository's struct promisor_remote_config.

> No test, and I want to be upfront about why. The t5710 fixture

Thank you for being upfront about this. I noticed that t0410-partial-clone.sh already has a test with two promisor remotes ("fetching from another promisor remote"), so maybe a test for the order could go there. It would also catch the crash above.

I also could not find the new variable in Documentation/config/promisor.adoc. I suggest adding it there too.

> +    if (!strcmp(var, "promisor.fetchorder")) {
One small thing: this line is indented with spaces instead of a tab.

Best, Tanga

Previous: Yopa NellyNext: Kaartic Sivaraam
Message 2 of 11 in “promisor-remote: honor promisor.fetchOrder when trying remotes”
  1. Yopa NellyNov 4, 2026
  2. Tanga JorisNov 5, 2026
  3. Kaartic SivaraamNov 5, 2026
  4. Tatchou Yopa NellyNov 5, 2026
  5. Kaartic SivaraamNov 13, 2026
  6. Tatchou Yopa NellyNov 13, 2026
  7. [Outreachy][PATCH v2] promisor-remote: honor promisor.fetchOrder when trying remotesYopa Nelly, Nov 5, 2026
  8. Junio C HamanoNov 5, 2026
  9. Christian CouderNov 13, 2026
  10. Tatchou Yopa NellyNov 13, 2026
  11. Junio C HamanoNov 13, 2026

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.