# [Outreachy] Config shape for promisor fetch ordering some thoughts

1 messages from 2026-11-04 to 2026-11-04. Participants: Tatchou Yopa Nelly.
Thread: https://gitlist.dev/t/66765

## Tatchou Yopa Nelly, 2026-11-04 08:58

Subject: [Outreachy] Config shape for promisor fetch ordering some thoughts
Message-ID: <CAG7jffxDguporrsGrB1Wv6K1DPVa4zbRpNjYNn9B1Nytp06RqA@mail.gmail.com>
URL: https://gitlist.dev/e/CAG7jffxDguporrsGrB1Wv6K1DPVa4zbRpNjYNn9B1Nytp06RqA%40mail.gmail.com

```
Hello everyone,

I'm Yopa Nelly, applying for the promisor remote fetch ordering
project with Kaartic Sivaraam. I've been reading through
promisor-remote.c and t5710 to understand what happens today, and
before I start writing anything I wanted to get some feedback on
the config shape. The project page says to float it on the list
first, so here I am.

What I think happens now: remotes are kept in a linked list in
config order, and the extensions.partialClone remote gets moved to
the end. Then lazy_fetch_objects() goes through the list twice
once for the remotes the server told us to use and once for the
rest. As far as I can tell there's no way for a user to say
"actually, try this one first" other than moving config lines
around.

So the two options I keep coming back to:

  1. remote.<name>.promisorPriority = <number>
  2. promisor.fetchOrder = <comma-separated list>

I think I prefer the list. Numbers feel fine when there's one config
file, but once it's spread across system/global/local it gets hard
to look at and know what the order will be. A list is easier to
read, and it's easier to override in a later config file without
having to pick a number that beats whatever was there before. It
also maps pretty directly onto the linked list we already have, so
hopefully it's not a huge change to sort it.

The thing I keep tripping over with the numbers approach is what to
do with remotes that don't have a priority set. Zero? Infinity?
Something in between? With a list, "not listed" means "after the
listed ones, in the usual order," which feels obvious.

A few cases I'm not sure about and would love an opinion on:

- If someone names a remote in promisor.fetchOrder that isn't
  actually a promisor remote, is that an error, a warning, or just
  ignore it?
- Does extensions.partialClone still go to the end, or can an
  explicit entry in the list override that?
- Do we expect to want different orders depending on which remote
  we're fetching from later on? If yes, that makes the per-remote
  number look more appealing.

I'd rather sort this out now than write something and then have to
redo it. Any preference, or anything I've got wrong about how it
works today?

Thanks,
Yopa Nelly
GitHub: https://github.com/YopaNelly


```
