{"thread":{"id":"66773","subject":"[Outreachy][PATCH] promisor-remote: honor promisor.fetchOrder when trying remotes","startedAt":"2026-11-04T17:24:34Z","lastAt":"2026-11-13T19:58:37Z","messageCount":11,"participants":["Yopa Nelly","Tanga Joris","Kaartic Sivaraam","Tatchou Yopa Nelly","Junio C Hamano","Christian Couder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"557467","messageId":"20261104172434.691381-1-yopatatchou@gmail.com","threadId":"66773","inReplyTo":null,"subject":"[Outreachy][PATCH] promisor-remote: honor promisor.fetchOrder when trying remotes","fromName":"Yopa Nelly","fromEmail":"yopatatchou@gmail.com","sentAt":"2026-11-04T17:24:34Z","receivedAt":"2026-11-04T17:24:34Z","isPatch":true,"sender":{"key":"yopatatchou@gmail.com","avatar":null},"body":"From: Nelly Yopa <yopatatchou@gmail.com>\n\nWhen a repo has multiple promisor remotes, Git just tries them in\nthe order they happen to be in the config. If you want to try one\nremote before another, the only way is to move lines around in the\nconfig file, which is awkward, especially once you have per-worktree\nor system/global configs in play.\n\nThis adds a promisor.fetchOrder config variable that takes a\ncomma-separated list of remote names. Remotes listed there are tried\nfirst, in the order they're listed. Remotes that aren't listed are\ntried afterwards, in their original config order. The\nextensions.partialClone remote still ends up last (that's done by\npromisor_remote_move_to_tail() in promisor_remote_init()), unless\nsomeone names it in fetchOrder, in which case its listed position\nwins.\n\nThe sort happens inside each pass in try_promisor_remotes(), so the\nexisting \"accepted remotes before the rest\" behavior is unchanged.\nWithin each pass, the order from fetchOrder wins.\n\nI put the parser in promisor_remote_config() next to the other\npromisor keys. It stores the parsed list in a file-static\nstring_list. The per-remote order field is set in\npromisor_remote_apply_fetch_order(), which runs at the end of\npromisor_remote_init() after the partialClone remote has been moved\nto the tail. The actual sort is a small stable insertion sort in\npromisor_remote_sort(); order == 0 means \"not listed\" so unnamed\nremotes still sort after named ones without losing their relative\norder. It's called once at the start of try_promisor_remotes() and\nis effectively a no-op on the second pass if the first one already\nsucceeded.\n\nI didn't validate the names in fetchOrder against the set of\nconfigured promisor remotes. A typo just means that remote doesn't\nappear in the list and keeps its default position. That's how other\nlist-valued config variables in Git behave, and it keeps the parser\nsmall.\n\nNo test, and I want to be upfront about why. The t5710 fixture\nalways has the server satisfy a filtered clone from its own\npromisor remote, so the client never actually triggers a lazy fetch\ninside that test, which means the ordering change can't be observed\nthere. I'd need a different fixture, one that gives the client two\npromisor remotes and keeps the server out of the picture. I'm happy\nto write that as a follow-up if that's the right direction.\n\nSigned-off-by: Yopa Nelly <yopatatchou@gmail.com>\n---\n promisor-remote.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++-\n promisor-remote.h |  1 +\n 2 files changed, 70 insertions(+), 1 deletion(-)\n\ndiff --git a/promisor-remote.c b/promisor-remote.c\nindex 316d9950aa..56e9eeabe3 100644\n--- a/promisor-remote.c\n+++ b/promisor-remote.c\n@@ -21,6 +21,9 @@ struct promisor_remote_config {\n \tstruct promisor_remote **promisors_tail;\n };\n \n+static struct string_list fetch_order = STRING_LIST_INIT_DUP;\n+static int fetch_order_initialized;\n+\n static int fetch_objects(struct repository *repo,\n \t\t\t const char *remote_name,\n \t\t\t const struct object_id *oids,\n@@ -120,6 +123,20 @@ static int promisor_remote_config(const char *var, const char *value,\n \tsize_t namelen;\n \tconst char *subkey;\n \n+    if (!strcmp(var, \"promisor.fetchorder\")) {\n+\t\tchar *value_copy;\n+\n+\t\tif (!value)\n+\t\t\treturn config_error_nonbool(var);\n+\t\tvalue_copy = xstrdup(value);\n+\t\tstring_list_split_in_place_f(&fetch_order, value_copy, \",\", -1,\n+\t\t\t\t\t     STRING_LIST_SPLIT_TRIM |\n+\t\t\t\t\t     STRING_LIST_SPLIT_NONEMPTY);\n+\t\tfree(value_copy);\n+\t\tfetch_order_initialized = 1;\n+\t\treturn 0;\n+\t}\n+\n \tif (parse_config_key(var, \"remote\", &name, &namelen, &subkey) < 0)\n \t\treturn 0;\n \n@@ -157,6 +174,24 @@ static int promisor_remote_config(const char *var, const char *value,\n \treturn 0;\n }\n \n+static void promisor_remote_apply_fetch_order(struct promisor_remote_config *config)\n+{\n+\tstruct promisor_remote *r;\n+\tsize_t i;\n+\n+\tif (!fetch_order_initialized)\n+\t\treturn;\n+\n+\tfor (i = 0; i < fetch_order.nr; i++) {\n+\t\tfor (r = config->promisors; r; r = r->next) {\n+\t\t\tif (!strcmp(r->name, fetch_order.items[i].string)) {\n+\t\t\t\tr->order = i + 1;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\t}\n+}\n+\n static void promisor_remote_init(struct repository *r)\n {\n \tstruct promisor_remote_config *config;\n@@ -180,6 +215,8 @@ static void promisor_remote_init(struct repository *r)\n \t\telse\n \t\t\tpromisor_remote_new(config, r->repository_format_partial_clone);\n \t}\n+\n+\tpromisor_remote_apply_fetch_order(config);\n }\n \n void promisor_remote_clear(struct promisor_remote_config *config)\n@@ -262,6 +299,34 @@ static int remove_fetched_oids(struct repository *repo,\n \treturn remaining_nr;\n }\n \n+static void promisor_remote_sort(struct promisor_remote_config *config)\n+{\n+\tstruct promisor_remote *sorted = NULL;\n+\tstruct promisor_remote *r = config->promisors;\n+\n+\tif (!fetch_order_initialized)\n+\t\treturn;\n+\n+\twhile (r) {\n+\t\tstruct promisor_remote *next = r->next;\n+\t\tstruct promisor_remote **pp = &sorted;\n+\n+\t\twhile (*pp && ((*pp)->order == 0\n+\t\t\t       ? r->order != 0\n+\t\t\t       : r->order == 0 || (*pp)->order <= r->order))\n+\t\t\tpp = &(*pp)->next;\n+\n+\t\tr->next = *pp;\n+\t\t*pp = r;\n+\t\tr = next;\n+\t}\n+\n+\tconfig->promisors = sorted;\n+\tconfig->promisors_tail = &config->promisors;\n+\twhile (*config->promisors_tail)\n+\t\tconfig->promisors_tail = &(*config->promisors_tail)->next;\n+}\n+\n /*\n  * Fetch the remaining objects (given in '*remaining_oids', which\n  * contains '*remaining_nr' object ids) from the known promisor\n@@ -286,7 +351,10 @@ static int try_promisor_remotes(struct repository *repo,\n \t\t\t\tint depth,\n \t\t\t\tbool accepted_only)\n {\n-\tstruct promisor_remote *r = repo->promisor_remote_config->promisors;\n+\tstruct promisor_remote *r;\n+\n+\tpromisor_remote_sort(repo->promisor_remote_config);\n+\tr = repo->promisor_remote_config->promisors;\n \n \tfor (; r; r = r->next) {\n \t\tif (accepted_only != r->accepted)\ndiff --git a/promisor-remote.h b/promisor-remote.h\nindex 301f5ac5cb..679a138bb1 100644\n--- a/promisor-remote.h\n+++ b/promisor-remote.h\n@@ -17,6 +17,7 @@ struct promisor_remote {\n \tchar *partial_clone_filter;\n \tchar *advertised_filter;\n \tunsigned int accepted : 1;\n+\tint order;\n \tconst char name[FLEX_ARRAY];\n };\n \n-- \n2.43.0\n\n\n"},{"id":"557551","messageId":"CAKrRMNpAW+f2XXMFqpB8ffZsTdyPsaFtHe8dku=JVXACp1M3Hw@mail.gmail.com","threadId":"66773","inReplyTo":"20261104172434.691381-1-yopatatchou@gmail.com","subject":"Re: [Outreachy][PATCH] promisor-remote: honor promisor.fetchOrder when trying remotes","fromName":"Tanga Joris","fromEmail":"tangajoris@gmail.com","sentAt":"2026-11-05T14:30:33Z","receivedAt":"2026-11-05T14:30:33Z","isPatch":true,"sender":{"key":"tangajoris@gmail.com","avatar":null},"body":"Hello Nelly,\n\nThanks for working on this, being able to choose the order of\npromisor remotes sounds useful.\n\nI tried your patch on top of master (0ffa3e35c7) in a partial clone,\nand I think there is a problem when the new variable is set:\n\n  $ git config promisor.fetchOrder origin\n  $ git show HEAD:f\n  BUG: string-list.c:340: string_list_split_in_place() called with\nstrdup_strings\n\nOn Wed, 4 Nov 2026 at 20:48, Yopa Nelly <yopatatchou@gmail.com> wrote:\n> +               char *value_copy;\n> +\n> +               if (!value)\n> +                       return config_error_nonbool(var);\n> +               value_copy = xstrdup(value);\n> +               string_list_split_in_place_f(&fetch_order, value_copy, \",\", -1,\n\nWithout the variable it works fine. I think this is because\nfetch_order is created with STRING_LIST_INIT_DUP, but\nstring_list_split_in_place_f() is used on it. Maybe\nstring_list_split_f() would work here instead?\n\nAlso, each time the variable is seen the names are added to the\nsame list. The list is never cleared, so values from several config\nfiles pile up.\n\nIt also looks like the list is file-static, so every repository in the\nprocess (for example submodules) shares it, while the rest of\nthe promisor config lives in each repository's struct\npromisor_remote_config.\n\n> No test, and I want to be upfront about why. The t5710 fixture\n\nThank you for being upfront about this. I noticed that\nt0410-partial-clone.sh already has a test with two promisor remotes\n(\"fetching from another promisor remote\"), so maybe a test for the\norder could go there. It would also catch the crash above.\n\nI also could not find the new variable in\nDocumentation/config/promisor.adoc. I suggest adding it there\ntoo.\n\n> +    if (!strcmp(var, \"promisor.fetchorder\")) {\n\nOne small thing: this line is indented with spaces instead of a tab.\n\nBest,\nTanga\n\n"},{"id":"557579","messageId":"894327d9-57b5-4adc-b300-25d946211606@gmail.com","threadId":"66773","inReplyTo":"20261104172434.691381-1-yopatatchou@gmail.com","subject":"Re: [Outreachy][PATCH] promisor-remote: honor promisor.fetchOrder when trying remotes","fromName":"Kaartic Sivaraam","fromEmail":"kaartic.sivaraam@gmail.com","sentAt":"2026-11-05T16:31:22Z","receivedAt":"2026-11-05T16:31:22Z","isPatch":true,"sender":{"key":"kaartic.sivaraam@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12448084?v=4"},"body":"On 11/4/26 22:54, Yopa Nelly wrote:\n> From: Nelly Yopa <yopatatchou@gmail.com>\n> > When a repo has multiple promisor remotes, Git just tries them in\n> the order they happen to be in the config. If you want to try one\n> remote before another, the only way is to move lines around in the\n> config file, which is awkward, especially once you have per-worktree\n> or system/global configs in play.\n> > This adds a promisor.fetchOrder config variable that takes a\n> comma-separated list of remote names. Remotes listed there are tried\n> first, in the order they're listed. Remotes that aren't listed are\n> tried afterwards, in their original config order. The\n> extensions.partialClone remote still ends up last (that's done by\n> promisor_remote_move_to_tail() in promisor_remote_init()), unless\n> someone names it in fetchOrder, in which case its listed position\n> wins.\n> > The sort happens inside each pass in try_promisor_remotes(), so the\n> existing \"accepted remotes before the rest\" behavior is unchanged.\n> Within each pass, the order from fetchOrder wins.\n> > I put the parser in promisor_remote_config() next to the other\n> promisor keys. It stores the parsed list in a file-static\n> string_list. The per-remote order field is set in\n> promisor_remote_apply_fetch_order(), which runs at the end of\n> promisor_remote_init() after the partialClone remote has been moved\n> to the tail. The actual sort is a small stable insertion sort in\n> promisor_remote_sort(); order == 0 means \"not listed\" so unnamed\n> remotes still sort after named ones without losing their relative\n> order. It's called once at the start of try_promisor_remotes() and\n> is effectively a no-op on the second pass if the first one already\n> succeeded.\n> > I didn't validate the names in fetchOrder against the set of\n> configured promisor remotes. A typo just means that remote doesn't\n> appear in the list and keeps its default position. That's how other\n> list-valued config variables in Git behave, and it keeps the parser\n> small.\n> > No test, and I want to be upfront about why. The t5710 fixture\n> always has the server satisfy a filtered clone from its own\n> promisor remote, so the client never actually triggers a lazy fetch\n> inside that test, which means the ordering change can't be observed\n> there. I'd need a different fixture, one that gives the client two\n> promisor remotes and keeps the server out of the picture. I'm happy\n> to write that as a follow-up if that's the right direction.\n> To be honest, only part of the commit describes the change. The rest of it reads part like you're talking to the people on the lis. You might want to give the SubmittingPatches section a read:\n\n  https://git-scm.com/docs/SubmittingPatches#describe-changes\n\nAlso, this patch kind of tries achieve a part of the project without actually going through the RFC part of it. That feels a bit strange. Did you possibly misunderstand what a microproject is supposed to be? Did you possibly read the following guides and have some difficulties with parts of it? If so, I'd be glad to hear more about it so that we can fix the same.\n\n  https://git.github.io/General-Microproject-Information/\n\n  https://git.github.io/General-Application-Information/\n\n-- \nSivaraam\n\n\n"},{"id":"557635","messageId":"20261105225223.1163975-1-yopatatchou@gmail.com","threadId":"66773","inReplyTo":"20261104172434.691381-1-yopatatchou@gmail.com","subject":"[Outreachy][PATCH v2] promisor-remote: honor promisor.fetchOrder when trying remotes","fromName":"Yopa Nelly","fromEmail":"yopatatchou@gmail.com","sentAt":"2026-11-05T22:52:23Z","receivedAt":"2026-11-05T22:52:23Z","isPatch":true,"sender":{"key":"yopatatchou@gmail.com","avatar":null},"body":"From: Nelly Yopa <yopatatchou@gmail.com>\n\nWhen a repository is configured with more than one promisor\nremote, Git tries them one after another until the missing\nobjects have been fetched. The order is currently determined\nonly by the order in which remote.<name>.promisor entries appear\nin the configuration. There is no way to say \"try this remote\nfirst\" without moving config lines around.\n\nAdd a promisor.fetchOrder configuration variable that takes a\ncomma-separated list of remote names. Remotes named in the list\nare tried first, in the order listed. Remotes not named in the\nlist are tried afterwards, in their original configuration\norder. The extensions.partialClone remote is still moved to the\nend of the list by promisor_remote_init() unless it is named in\nfetchOrder, in which case its listed position wins.\n\nThe order is applied inside each of the two passes in\nlazy_fetch_objects() first the accepted remotes, then the\nrest so the existing \"accepted before configured\" behavior is\nunchanged. Within each pass, the fetchOrder order takes\nprecedence over the configuration order.\n\nThe parsed list is stored in struct promisor_remote_config and\nis re-parsed each time the config is read. Instead of sorting\nthe linked list at fetch time, try_promisor_remotes() walks the\nlist twice: once in fetchOrder order for the remotes named\nthere, and once in the original config order for the rest.\n\nSigned-off-by: Yopa Nelly <yopatatchou@gmail.com>\n---\n Documentation/config/promisor.adoc |  11 +++\n promisor-remote.c                  | 108 +++++++++++++++++++++++++----\n 2 files changed, 107 insertions(+), 12 deletions(-)\n\ndiff --git a/Documentation/config/promisor.adoc b/Documentation/config/promisor.adoc\nindex c1f3d766a6..ccc0925800 100644\n--- a/Documentation/config/promisor.adoc\n+++ b/Documentation/config/promisor.adoc\n@@ -31,6 +31,17 @@ This list has no effect unless the \"promisor.advertise\" config\n variable is set to \"true\", and the \"name\" and \"url\" fields are always\n advertised regardless of this setting.\n \n+`promisor.fetchOrder`::\n+\tA comma-separated list of promisor remote names. When Git\n+\tneeds to lazily fetch a missing object, it tries the remotes\n+\tin this list first, in the order listed, then the remaining\n+\tconfigured promisor remotes in their configuration order.\n+\tThe `extensions.partialClone` remote is tried last unless it\n+\tis named in this list.\n++\n+See linkgit:gitprotocol-v2[5] and the \"Partial Clone Design\n+Notes\" in link:technical/partial-clone.html[Documentation/technical/partial-clone].\n+\n promisor.acceptFromServer::\n \tControls which promisor remotes advertised by a server (using the\n \t\"promisor-remote\" protocol capability) a client will accept. By\ndiff --git a/promisor-remote.c b/promisor-remote.c\nindex 316d9950aa..c664a48f88 100644\n--- a/promisor-remote.c\n+++ b/promisor-remote.c\n@@ -19,8 +19,11 @@\n struct promisor_remote_config {\n \tstruct promisor_remote *promisors;\n \tstruct promisor_remote **promisors_tail;\n+\tstruct string_list fetch_order;\n+\tint fetch_order_initialized;\n };\n \n+\n static int fetch_objects(struct repository *repo,\n \t\t\t const char *remote_name,\n \t\t\t const struct object_id *oids,\n@@ -120,6 +123,29 @@ static int promisor_remote_config(const char *var, const char *value,\n \tsize_t namelen;\n \tconst char *subkey;\n \n+    \tif (!strcmp(var, \"promisor.fetchorder\")) {\n+\t\tchar *value_copy;\n+\n+\t\tif (!value)\n+\t\t\treturn config_error_nonbool(var);\n+\t\t/*\n+\t\t * The list is re-read from scratch every time the config\n+\t\t * is parsed, so start by clearing any previous entries.\n+\t\t */\n+\t\tif (config->fetch_order_initialized)\n+\t\t\tstring_list_clear(&config->fetch_order, 0);\n+\t\telse\n+\t\t\tstring_list_init_nodup(&config->fetch_order);\n+\n+\t\tvalue_copy = xstrdup(value);\n+\t\tstring_list_split_in_place_f(&config->fetch_order, value_copy, \",\", -1,\n+\t\t\t\t\t     STRING_LIST_SPLIT_TRIM |\n+\t\t\t\t\t     STRING_LIST_SPLIT_NONEMPTY);\n+\t\tfree(value_copy);\n+\t\tconfig->fetch_order_initialized = 1;\n+\t\treturn 0;\n+\t}\n+\n \tif (parse_config_key(var, \"remote\", &name, &namelen, &subkey) < 0)\n \t\treturn 0;\n \n@@ -157,6 +183,8 @@ static int promisor_remote_config(const char *var, const char *value,\n \treturn 0;\n }\n \n+\n+\n static void promisor_remote_init(struct repository *r)\n {\n \tstruct promisor_remote_config *config;\n@@ -180,6 +208,7 @@ static void promisor_remote_init(struct repository *r)\n \t\telse\n \t\t\tpromisor_remote_new(config, r->repository_format_partial_clone);\n \t}\n+\n }\n \n void promisor_remote_clear(struct promisor_remote_config *config)\n@@ -193,6 +222,9 @@ void promisor_remote_clear(struct promisor_remote_config *config)\n \t}\n \n \tconfig->promisors_tail = &config->promisors;\n+\tif (config->fetch_order_initialized)\n+\t\tstring_list_clear(&config->fetch_order, 0);\n+\tconfig->fetch_order_initialized = 0;\n }\n \n void repo_promisor_remote_reinit(struct repository *r)\n@@ -262,6 +294,8 @@ static int remove_fetched_oids(struct repository *repo,\n \treturn remaining_nr;\n }\n \n+\n+\n /*\n  * Fetch the remaining objects (given in '*remaining_oids', which\n  * contains '*remaining_nr' object ids) from the known promisor\n@@ -279,6 +313,24 @@ static int remove_fetched_oids(struct repository *repo,\n  * Return 1 when all the requested objects have been fetched, 0\n  * otherwise.\n  */\n+static int try_one_remote(struct repository *repo, struct promisor_remote *r,\n+\t\t\t  struct object_id **remaining_oids,\n+\t\t\t  int *remaining_nr, int *to_free, int depth)\n+{\n+\tif (fetch_objects(repo, r->name,\n+\t\t\t  *remaining_oids, *remaining_nr, depth) < 0) {\n+\t\tif (*remaining_nr == 1)\n+\t\t\treturn 0;\n+\t\t*remaining_nr = remove_fetched_oids(repo, remaining_oids,\n+\t\t\t\t\t\t    *remaining_nr, *to_free);\n+\t\tif (*remaining_nr) {\n+\t\t\t*to_free = 1;\n+\t\t\treturn 0;\n+\t\t}\n+\t}\n+\treturn 1; /* all fetched */\n+}\n+\n static int try_promisor_remotes(struct repository *repo,\n \t\t\t\tstruct object_id **remaining_oids,\n \t\t\t\tint *remaining_nr,\n@@ -286,24 +338,56 @@ static int try_promisor_remotes(struct repository *repo,\n \t\t\t\tint depth,\n \t\t\t\tbool accepted_only)\n {\n-\tstruct promisor_remote *r = repo->promisor_remote_config->promisors;\n+\tstruct promisor_remote_config *config = repo->promisor_remote_config;\n+\tstruct promisor_remote *r;\n+\tsize_t i;\n+\tint fetched;\n+\n+\t/*\n+\t * First pass: try the remotes in the order the user listed\n+\t * them in promisor.fetchOrder.\n+\t */\n+\tif (config->fetch_order_initialized) {\n+\t\tfor (i = 0; i < config->fetch_order.nr; i++) {\n+\t\t\tr = promisor_remote_lookup(config,\n+\t\t\t\t\t\t   config->fetch_order.items[i].string,\n+\t\t\t\t\t\t   NULL);\n+\t\t\tif (!r || accepted_only != r->accepted)\n+\t\t\t\tcontinue;\n \n-\tfor (; r; r = r->next) {\n+\t\t\tfetched = try_one_remote(repo, r, remaining_oids,\n+\t\t\t\t\t\t remaining_nr, to_free, depth);\n+\t\t\tif (fetched)\n+\t\t\t\treturn 1;\n+\t\t}\n+\t}\n+\n+\t/*\n+\t * Second pass: try the remaining remotes in their config order.\n+\t */\n+\tfor (r = config->promisors; r; r = r->next) {\n \t\tif (accepted_only != r->accepted)\n \t\t\tcontinue;\n-\t\tif (fetch_objects(repo, r->name,\n-\t\t\t\t  *remaining_oids, *remaining_nr, depth) < 0) {\n-\t\t\tif (*remaining_nr == 1)\n-\t\t\t\tcontinue;\n-\t\t\t*remaining_nr = remove_fetched_oids(repo, remaining_oids,\n-\t\t\t\t\t\t\t    *remaining_nr, *to_free);\n-\t\t\tif (*remaining_nr) {\n-\t\t\t\t*to_free = 1;\n-\t\t\t\tcontinue;\n+\n+\t\t/* Skip ones we already tried in the first pass. */\n+\t\tif (config->fetch_order_initialized) {\n+\t\t\tbool already_tried = false;\n+\t\t\tfor (i = 0; i < config->fetch_order.nr; i++) {\n+\t\t\t\tif (!strcmp(r->name, config->fetch_order.items[i].string)) {\n+\t\t\t\t\talready_tried = true;\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n \t\t\t}\n+\t\t\tif (already_tried)\n+\t\t\t\tcontinue;\n \t\t}\n-\t\treturn 1; /* all fetched */\n+\n+\t\tfetched = try_one_remote(repo, r, remaining_oids,\n+\t\t\t\t\t remaining_nr, to_free, depth);\n+\t\tif (fetched)\n+\t\t\treturn 1;\n \t}\n+\n \treturn 0;\n }\n \n-- \n2.43.0\n\n\n"},{"id":"557636","messageId":"CAG7jffxRscX3ntX3p8L1GwGbs7WJmj6WoKPRGUuz3wcCS0NZag@mail.gmail.com","threadId":"66773","inReplyTo":"894327d9-57b5-4adc-b300-25d946211606@gmail.com","subject":"Re: [Outreachy][PATCH] promisor-remote: honor promisor.fetchOrder when trying remotes","fromName":"Tatchou Yopa Nelly","fromEmail":"yopatatchou@gmail.com","sentAt":"2026-11-05T22:55:42Z","receivedAt":"2026-11-05T22:55:42Z","isPatch":true,"sender":{"key":"yopatatchou@gmail.com","avatar":null},"body":"Hi Tanga,\n\nThanks for the careful review you caught real bugs. I've sent a v2\nthat addresses all of your points:\n\n- fetch_order is now in struct promisor_remote_config, not a\n  file-static, so it is per-repository and gets cleared with the\n  rest of the promisor config.\n- The list is now initialized with string_list_init_nodup() on first\n  use, matching what string_list_split_in_place_f() expects, so the\n  BUG is gone. I reproduced your exact sequence to confirm.\n- The docs entry is added to Documentation/config/promisor.adoc.\n- The whitespace is fixed.\n\nI also dropped the linked-list insertion sort. Instead,\ntry_promisor_remotes() now walks the list twice: once in fetchOrder\norder for the named remotes, then in original config order for the\nrest. That's simpler than sorting a linked list at fetch time, and\nit keeps the accepted/unaccepted two-pass logic unchanged.\n\nI didn't add a test yet. You mentioned t0410-partial-clone.sh already\nhas a test with two promisor remotes (\"fetching from another\npromisor remote\"). I'll look at whether the ordering can be verified\nthere, either as part of a v3 or as a follow-up.\n\nKaartic, I've also re-read SubmittingPatches#describe-changes and\nrewritten the commit message to describe the change rather than\naddress the reviewers directly. On the RFC point: I treated the\nPhase 2 config work as the micro-patch and skipped the RFC step\nyou pointed out. Should I step back and send the design RFC first,\nor keep the current patch as a prototype while we discuss the\nconfig shape on the list?\n\nThanks,\nYopa Nelly\n\n\nOn Thu, 5 Nov 2026 at 17:31, Kaartic Sivaraam\n<kaartic.sivaraam@gmail.com> wrote:\n>\n> On 11/4/26 22:54, Yopa Nelly wrote:\n> > From: Nelly Yopa <yopatatchou@gmail.com>\n> >\n> > When a repo has multiple promisor remotes, Git just tries them in\n> > the order they happen to be in the config. If you want to try one\n> > remote before another, the only way is to move lines around in the\n> > config file, which is awkward, especially once you have per-worktree\n> > or system/global configs in play.\n> >\n> > This adds a promisor.fetchOrder config variable that takes a\n> > comma-separated list of remote names. Remotes listed there are tried\n> > first, in the order they're listed. Remotes that aren't listed are\n> > tried afterwards, in their original config order. The\n> > extensions.partialClone remote still ends up last (that's done by\n> > promisor_remote_move_to_tail() in promisor_remote_init()), unless\n> > someone names it in fetchOrder, in which case its listed position\n> > wins.\n> >\n> > The sort happens inside each pass in try_promisor_remotes(), so the\n> > existing \"accepted remotes before the rest\" behavior is unchanged.\n> > Within each pass, the order from fetchOrder wins.\n> >\n> > I put the parser in promisor_remote_config() next to the other\n> > promisor keys. It stores the parsed list in a file-static\n> > string_list. The per-remote order field is set in\n> > promisor_remote_apply_fetch_order(), which runs at the end of\n> > promisor_remote_init() after the partialClone remote has been moved\n> > to the tail. The actual sort is a small stable insertion sort in\n> > promisor_remote_sort(); order == 0 means \"not listed\" so unnamed\n> > remotes still sort after named ones without losing their relative\n> > order. It's called once at the start of try_promisor_remotes() and\n> > is effectively a no-op on the second pass if the first one already\n> > succeeded.\n> >\n> > I didn't validate the names in fetchOrder against the set of\n> > configured promisor remotes. A typo just means that remote doesn't\n> > appear in the list and keeps its default position. That's how other\n> > list-valued config variables in Git behave, and it keeps the parser\n> > small.\n> >\n> > No test, and I want to be upfront about why. The t5710 fixture\n> > always has the server satisfy a filtered clone from its own\n> > promisor remote, so the client never actually triggers a lazy fetch\n> > inside that test, which means the ordering change can't be observed\n> > there. I'd need a different fixture, one that gives the client two\n> > promisor remotes and keeps the server out of the picture. I'm happy\n> > to write that as a follow-up if that's the right direction.\n> >\n>\n> To be honest, only part of the commit describes the change. The rest of\n> it reads part like you're talking to the people on the lis. You might\n> want to give the SubmittingPatches section a read:\n>\n>    https://git-scm.com/docs/SubmittingPatches#describe-changes\n>\n> Also, this patch kind of tries achieve a part of the project without\n> actually going through the RFC part of it. That feels a bit strange. Did\n> you possibly misunderstand what a microproject is supposed to be? Did\n> you possibly read the following guides and have some difficulties with\n> parts of it? If so, I'd be glad to hear more about it so that we can fix\n> the same.\n>\n>    https://git.github.io/General-Microproject-Information/\n>\n>    https://git.github.io/General-Application-Information/\n>\n> --\n> Sivaraam\n>\n\n"},{"id":"557638","messageId":"xmqq8q36q3il.fsf@gitster.g","threadId":"66773","inReplyTo":"20261105225223.1163975-1-yopatatchou@gmail.com","subject":"Re: [Outreachy][PATCH v2] promisor-remote: honor promisor.fetchOrder when trying remotes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-11-05T23:09:38Z","receivedAt":"2026-11-05T23:09:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian, I thought you are the go-to person for promisor remote,\nand if I am not mistaken, you worked on letting the server side tell\nthe clients which promisors to use first?  How would this mesh well\nwith that?\n\nThanks.\n\nYopa Nelly <yopatatchou@gmail.com> writes:\n\n> From: Nelly Yopa <yopatatchou@gmail.com>\n>\n> When a repository is configured with more than one promisor\n> remote, Git tries them one after another until the missing\n> objects have been fetched. The order is currently determined\n> only by the order in which remote.<name>.promisor entries appear\n> in the configuration. There is no way to say \"try this remote\n> first\" without moving config lines around.\n>\n> Add a promisor.fetchOrder configuration variable that takes a\n> comma-separated list of remote names. Remotes named in the list\n> are tried first, in the order listed. Remotes not named in the\n> list are tried afterwards, in their original configuration\n> order. The extensions.partialClone remote is still moved to the\n> end of the list by promisor_remote_init() unless it is named in\n> fetchOrder, in which case its listed position wins.\n>\n> The order is applied inside each of the two passes in\n> lazy_fetch_objects() first the accepted remotes, then the\n> rest so the existing \"accepted before configured\" behavior is\n> unchanged. Within each pass, the fetchOrder order takes\n> precedence over the configuration order.\n>\n> The parsed list is stored in struct promisor_remote_config and\n> is re-parsed each time the config is read. Instead of sorting\n> the linked list at fetch time, try_promisor_remotes() walks the\n> list twice: once in fetchOrder order for the remotes named\n> there, and once in the original config order for the rest.\n>\n> Signed-off-by: Yopa Nelly <yopatatchou@gmail.com>\n> ---\n>  Documentation/config/promisor.adoc |  11 +++\n>  promisor-remote.c                  | 108 +++++++++++++++++++++++++----\n>  2 files changed, 107 insertions(+), 12 deletions(-)\n>\n> diff --git a/Documentation/config/promisor.adoc b/Documentation/config/promisor.adoc\n> index c1f3d766a6..ccc0925800 100644\n> --- a/Documentation/config/promisor.adoc\n> +++ b/Documentation/config/promisor.adoc\n> @@ -31,6 +31,17 @@ This list has no effect unless the \"promisor.advertise\" config\n>  variable is set to \"true\", and the \"name\" and \"url\" fields are always\n>  advertised regardless of this setting.\n>  \n> +`promisor.fetchOrder`::\n> +\tA comma-separated list of promisor remote names. When Git\n> +\tneeds to lazily fetch a missing object, it tries the remotes\n> +\tin this list first, in the order listed, then the remaining\n> +\tconfigured promisor remotes in their configuration order.\n> +\tThe `extensions.partialClone` remote is tried last unless it\n> +\tis named in this list.\n> ++\n> +See linkgit:gitprotocol-v2[5] and the \"Partial Clone Design\n> +Notes\" in link:technical/partial-clone.html[Documentation/technical/partial-clone].\n> +\n>  promisor.acceptFromServer::\n>  \tControls which promisor remotes advertised by a server (using the\n>  \t\"promisor-remote\" protocol capability) a client will accept. By\n> diff --git a/promisor-remote.c b/promisor-remote.c\n> index 316d9950aa..c664a48f88 100644\n> --- a/promisor-remote.c\n> +++ b/promisor-remote.c\n> @@ -19,8 +19,11 @@\n>  struct promisor_remote_config {\n>  \tstruct promisor_remote *promisors;\n>  \tstruct promisor_remote **promisors_tail;\n> +\tstruct string_list fetch_order;\n> +\tint fetch_order_initialized;\n>  };\n>  \n> +\n>  static int fetch_objects(struct repository *repo,\n>  \t\t\t const char *remote_name,\n>  \t\t\t const struct object_id *oids,\n> @@ -120,6 +123,29 @@ static int promisor_remote_config(const char *var, const char *value,\n>  \tsize_t namelen;\n>  \tconst char *subkey;\n>  \n> +    \tif (!strcmp(var, \"promisor.fetchorder\")) {\n> +\t\tchar *value_copy;\n> +\n> +\t\tif (!value)\n> +\t\t\treturn config_error_nonbool(var);\n> +\t\t/*\n> +\t\t * The list is re-read from scratch every time the config\n> +\t\t * is parsed, so start by clearing any previous entries.\n> +\t\t */\n> +\t\tif (config->fetch_order_initialized)\n> +\t\t\tstring_list_clear(&config->fetch_order, 0);\n> +\t\telse\n> +\t\t\tstring_list_init_nodup(&config->fetch_order);\n> +\n> +\t\tvalue_copy = xstrdup(value);\n> +\t\tstring_list_split_in_place_f(&config->fetch_order, value_copy, \",\", -1,\n> +\t\t\t\t\t     STRING_LIST_SPLIT_TRIM |\n> +\t\t\t\t\t     STRING_LIST_SPLIT_NONEMPTY);\n> +\t\tfree(value_copy);\n> +\t\tconfig->fetch_order_initialized = 1;\n> +\t\treturn 0;\n> +\t}\n> +\n>  \tif (parse_config_key(var, \"remote\", &name, &namelen, &subkey) < 0)\n>  \t\treturn 0;\n>  \n> @@ -157,6 +183,8 @@ static int promisor_remote_config(const char *var, const char *value,\n>  \treturn 0;\n>  }\n>  \n> +\n> +\n>  static void promisor_remote_init(struct repository *r)\n>  {\n>  \tstruct promisor_remote_config *config;\n> @@ -180,6 +208,7 @@ static void promisor_remote_init(struct repository *r)\n>  \t\telse\n>  \t\t\tpromisor_remote_new(config, r->repository_format_partial_clone);\n>  \t}\n> +\n>  }\n>  \n>  void promisor_remote_clear(struct promisor_remote_config *config)\n> @@ -193,6 +222,9 @@ void promisor_remote_clear(struct promisor_remote_config *config)\n>  \t}\n>  \n>  \tconfig->promisors_tail = &config->promisors;\n> +\tif (config->fetch_order_initialized)\n> +\t\tstring_list_clear(&config->fetch_order, 0);\n> +\tconfig->fetch_order_initialized = 0;\n>  }\n>  \n>  void repo_promisor_remote_reinit(struct repository *r)\n> @@ -262,6 +294,8 @@ static int remove_fetched_oids(struct repository *repo,\n>  \treturn remaining_nr;\n>  }\n>  \n> +\n> +\n>  /*\n>   * Fetch the remaining objects (given in '*remaining_oids', which\n>   * contains '*remaining_nr' object ids) from the known promisor\n> @@ -279,6 +313,24 @@ static int remove_fetched_oids(struct repository *repo,\n>   * Return 1 when all the requested objects have been fetched, 0\n>   * otherwise.\n>   */\n> +static int try_one_remote(struct repository *repo, struct promisor_remote *r,\n> +\t\t\t  struct object_id **remaining_oids,\n> +\t\t\t  int *remaining_nr, int *to_free, int depth)\n> +{\n> +\tif (fetch_objects(repo, r->name,\n> +\t\t\t  *remaining_oids, *remaining_nr, depth) < 0) {\n> +\t\tif (*remaining_nr == 1)\n> +\t\t\treturn 0;\n> +\t\t*remaining_nr = remove_fetched_oids(repo, remaining_oids,\n> +\t\t\t\t\t\t    *remaining_nr, *to_free);\n> +\t\tif (*remaining_nr) {\n> +\t\t\t*to_free = 1;\n> +\t\t\treturn 0;\n> +\t\t}\n> +\t}\n> +\treturn 1; /* all fetched */\n> +}\n> +\n>  static int try_promisor_remotes(struct repository *repo,\n>  \t\t\t\tstruct object_id **remaining_oids,\n>  \t\t\t\tint *remaining_nr,\n> @@ -286,24 +338,56 @@ static int try_promisor_remotes(struct repository *repo,\n>  \t\t\t\tint depth,\n>  \t\t\t\tbool accepted_only)\n>  {\n> -\tstruct promisor_remote *r = repo->promisor_remote_config->promisors;\n> +\tstruct promisor_remote_config *config = repo->promisor_remote_config;\n> +\tstruct promisor_remote *r;\n> +\tsize_t i;\n> +\tint fetched;\n> +\n> +\t/*\n> +\t * First pass: try the remotes in the order the user listed\n> +\t * them in promisor.fetchOrder.\n> +\t */\n> +\tif (config->fetch_order_initialized) {\n> +\t\tfor (i = 0; i < config->fetch_order.nr; i++) {\n> +\t\t\tr = promisor_remote_lookup(config,\n> +\t\t\t\t\t\t   config->fetch_order.items[i].string,\n> +\t\t\t\t\t\t   NULL);\n> +\t\t\tif (!r || accepted_only != r->accepted)\n> +\t\t\t\tcontinue;\n>  \n> -\tfor (; r; r = r->next) {\n> +\t\t\tfetched = try_one_remote(repo, r, remaining_oids,\n> +\t\t\t\t\t\t remaining_nr, to_free, depth);\n> +\t\t\tif (fetched)\n> +\t\t\t\treturn 1;\n> +\t\t}\n> +\t}\n> +\n> +\t/*\n> +\t * Second pass: try the remaining remotes in their config order.\n> +\t */\n> +\tfor (r = config->promisors; r; r = r->next) {\n>  \t\tif (accepted_only != r->accepted)\n>  \t\t\tcontinue;\n> -\t\tif (fetch_objects(repo, r->name,\n> -\t\t\t\t  *remaining_oids, *remaining_nr, depth) < 0) {\n> -\t\t\tif (*remaining_nr == 1)\n> -\t\t\t\tcontinue;\n> -\t\t\t*remaining_nr = remove_fetched_oids(repo, remaining_oids,\n> -\t\t\t\t\t\t\t    *remaining_nr, *to_free);\n> -\t\t\tif (*remaining_nr) {\n> -\t\t\t\t*to_free = 1;\n> -\t\t\t\tcontinue;\n> +\n> +\t\t/* Skip ones we already tried in the first pass. */\n> +\t\tif (config->fetch_order_initialized) {\n> +\t\t\tbool already_tried = false;\n> +\t\t\tfor (i = 0; i < config->fetch_order.nr; i++) {\n> +\t\t\t\tif (!strcmp(r->name, config->fetch_order.items[i].string)) {\n> +\t\t\t\t\talready_tried = true;\n> +\t\t\t\t\tbreak;\n> +\t\t\t\t}\n>  \t\t\t}\n> +\t\t\tif (already_tried)\n> +\t\t\t\tcontinue;\n>  \t\t}\n> -\t\treturn 1; /* all fetched */\n> +\n> +\t\tfetched = try_one_remote(repo, r, remaining_oids,\n> +\t\t\t\t\t remaining_nr, to_free, depth);\n> +\t\tif (fetched)\n> +\t\t\treturn 1;\n>  \t}\n> +\n>  \treturn 0;\n>  }\n\n"},{"id":"558376","messageId":"a3ae6756-0985-4873-9d23-96d4bb49eda5@gmail.com","threadId":"66773","inReplyTo":"CAG7jffxRscX3ntX3p8L1GwGbs7WJmj6WoKPRGUuz3wcCS0NZag@mail.gmail.com","subject":"Re: [Outreachy][PATCH] promisor-remote: honor promisor.fetchOrder when trying remotes","fromName":"Kaartic Sivaraam","fromEmail":"kaartic.sivaraam@gmail.com","sentAt":"2026-11-13T09:51:09Z","receivedAt":"2026-11-13T09:51:09Z","isPatch":true,"sender":{"key":"kaartic.sivaraam@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12448084?v=4"},"body":"On 11/6/26 04:25, Tatchou Yopa Nelly wrote:\n> Hi Tanga,\n>\n\nNext time try to make sure the person you are writing to is in the To/Cc fields as appropriate. Otherwise, there is a chance that they will not even receive your message since not everyone reads the list by subscribing to it.> Kaartic, I've also re-read SubmittingPatches#describe-changes and\n> rewritten the commit message to describe the change rather than\n> address the reviewers directly.\n\nThat is good!\n\n> On the RFC point: I treated the\n> Phase 2 config work as the micro-patch and skipped the RFC step\n> you pointed out. Should I step back and send the design RFC first,\n> or keep the current patch as a prototype while we discuss the\n> config shape on the list?\n> I think treating the current patch as a RFC patch and discussing the shape is a good idea. The only concern I have is that this patch is submitted in the context of Outreachy and the candidate that we may potentially pick will work[note 1] on this during their Outreachy internship period. So, discussing this now sounds a little premature to me\n\nOf course, I don't mean to suggest that no two people should work on related areas. I'm just thinking it might be ideal to avoid premature work among Outreachy contributors before even the Outreachy selections are out.\n\n\n[note 1]: During the candidate discussion, it may also happen that we may not pick a candidate for the project. It is totally fine to work on this in that case as there will be no conflicts. But none of this is clear now, TBH.\n\n-- \nSivaraam\n\n\n"},{"id":"558383","messageId":"CAG7jffwSn_hv6tT1gSA=ZvMo5M3ONMC4hqo20UV0sg7ZhOseJA@mail.gmail.com","threadId":"66773","inReplyTo":"a3ae6756-0985-4873-9d23-96d4bb49eda5@gmail.com","subject":"Re: [Outreachy][PATCH] promisor-remote: honor promisor.fetchOrder when trying remotes","fromName":"Tatchou Yopa Nelly","fromEmail":"yopatatchou@gmail.com","sentAt":"2026-11-13T12:13:46Z","receivedAt":"2026-11-13T12:13:46Z","isPatch":true,"sender":{"key":"yopatatchou@gmail.com","avatar":null},"body":"Hi Kaartic,\n\nThanks for the clarification, and for pointing out the\nTo/Cc issue in my earlier reply; I'll be more careful about\nthat going forward.\n\nTreating the current patch as an RFC prototype and leaving the\nactual implementation work for the internship makes sense to me.\nI won't push further on it before the Outreachy selections are\nout. I'll keep an eye on the list in case anything changes.\n\nThanks,\nYopa Nelly\n\nOn Fri, 13 Nov 2026 at 10:51, Kaartic Sivaraam\n<kaartic.sivaraam@gmail.com> wrote:\n>\n> On 11/6/26 04:25, Tatchou Yopa Nelly wrote:\n> > Hi Tanga,\n> >\n>\n> Next time try to make sure the person you are writing to is in the To/Cc\n> fields as appropriate. Otherwise, there is a chance that they will not\n> even receive your message since not everyone reads the list by\n> subscribing to it.> Kaartic, I've also re-read\n> SubmittingPatches#describe-changes and\n> > rewritten the commit message to describe the change rather than\n> > address the reviewers directly.\n>\n> That is good!\n>\n> > On the RFC point: I treated the\n> > Phase 2 config work as the micro-patch and skipped the RFC step\n> > you pointed out. Should I step back and send the design RFC first,\n> > or keep the current patch as a prototype while we discuss the\n> > config shape on the list?\n> >\n>\n> I think treating the current patch as a RFC patch and discussing the\n> shape is a good idea. The only concern I have is that this patch is\n> submitted in the context of Outreachy and the candidate that we may\n> potentially pick will work[note 1] on this during their Outreachy\n> internship period. So, discussing this now sounds a little premature to me\n>\n> Of course, I don't mean to suggest that no two people should work on\n> related areas. I'm just thinking it might be ideal to avoid premature\n> work among Outreachy contributors before even the Outreachy selections\n> are out.\n>\n>\n> [note 1]: During the candidate discussion, it may also happen that we\n> may not pick a candidate for the project. It is totally fine to work on\n> this in that case as there will be no conflicts. But none of this is\n> clear now, TBH.\n>\n> --\n> Sivaraam\n>\n\n"},{"id":"558407","messageId":"CAP8UFD0zMp-e3Fp5SjXuHiu25718=vf+qetzwpRZmBPMJ8Vb0Q@mail.gmail.com","threadId":"66773","inReplyTo":"xmqq8q36q3il.fsf@gitster.g","subject":"Re: [Outreachy][PATCH v2] promisor-remote: honor promisor.fetchOrder when trying remotes","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2026-11-13T17:10:43Z","receivedAt":"2026-11-13T17:10:43Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Fri, Nov 6, 2026 at 12:09 AM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Christian, I thought you are the go-to person for promisor remote,\n> and if I am not mistaken, you worked on letting the server side tell\n> the clients which promisors to use first?  How would this mesh well\n> with that?\n\nSorry, for the late reply. I didn't have much time this week.\n\nFirst in https://git.github.io/General-Microproject-Information/ we\nhave a \"Don’t work on a proposed project right away\" section, but\nunfortunately this patch is addressing the main issue of a project we\nare proposing.\n\nIn general I think that there should be a design doc or a long\ndiscussion before we start implementing something, because the problem\ncould be complex. When you are fetching from different remotes, remote\nA might want the client to get some objects from a set of promisor\nremotes, like A1 and A2, while remote B, might advertise others like\nB1, B2 and B3. Also after a few regular fetches from let's say A and\nB, the client might need to lazy fetch some objects. Then it's not\nclear which order would be best. A single order might not work well.\nThe best order might depend on the remote from which related objects\nwere fetched.\n\n"},{"id":"558423","messageId":"CAG7jffxyM8kQMeio1Z9Y6Wa6JsHLUuFefq5XxKKKY-tfhfjHeg@mail.gmail.com","threadId":"66773","inReplyTo":"CAP8UFD0zMp-e3Fp5SjXuHiu25718=vf+qetzwpRZmBPMJ8Vb0Q@mail.gmail.com","subject":"Re: [Outreachy][PATCH v2] promisor-remote: honor promisor.fetchOrder when trying remotes","fromName":"Tatchou Yopa Nelly","fromEmail":"yopatatchou@gmail.com","sentAt":"2026-11-13T19:46:49Z","receivedAt":"2026-11-13T19:46:49Z","isPatch":true,"sender":{"key":"yopatatchou@gmail.com","avatar":null},"body":"Hi Christian,\n\nThanks for the reply, and for pointing me to the \"Don't work on a\nproposed project right away\" section I read it when I first found\nthe project page but I misread it as only applying to projects\nsomeone else was already working on, not to the main problem of the\nproject I was applying for. That was my mistake.\n\nYour description of the real problem is very clear. I had not\nconsidered that the best order could depend on which remote the\nrelated objects came from, and that a single list would not be able\nto express that. I can see now why this needs a design discussion\nbefore any code.\n\nI'll leave the patch as a prototype and wait for the Outreachy\nselections before touching it again, as Kaartic suggested.\n\nThanks,\nYopa Nelly\n\nOn Fri, 13 Nov 2026 at 18:10, Christian Couder\n<christian.couder@gmail.com> wrote:\n>\n> On Fri, Nov 6, 2026 at 12:09 AM Junio C Hamano <gitster@pobox.com> wrote:\n> >\n> > Christian, I thought you are the go-to person for promisor remote,\n> > and if I am not mistaken, you worked on letting the server side tell\n> > the clients which promisors to use first?  How would this mesh well\n> > with that?\n>\n> Sorry, for the late reply. I didn't have much time this week.\n>\n> First in https://git.github.io/General-Microproject-Information/ we\n> have a \"Don’t work on a proposed project right away\" section, but\n> unfortunately this patch is addressing the main issue of a project we\n> are proposing.\n>\n> In general I think that there should be a design doc or a long\n> discussion before we start implementing something, because the problem\n> could be complex. When you are fetching from different remotes, remote\n> A might want the client to get some objects from a set of promisor\n> remotes, like A1 and A2, while remote B, might advertise others like\n> B1, B2 and B3. Also after a few regular fetches from let's say A and\n> B, the client might need to lazy fetch some objects. Then it's not\n> clear which order would be best. A single order might not work well.\n> The best order might depend on the remote from which related objects\n> were fetched.\n\n"},{"id":"558425","messageId":"xmqqy0awa4gi.fsf@gitster.g","threadId":"66773","inReplyTo":"CAP8UFD0zMp-e3Fp5SjXuHiu25718=vf+qetzwpRZmBPMJ8Vb0Q@mail.gmail.com","subject":"Re: [Outreachy][PATCH v2] promisor-remote: honor promisor.fetchOrder when trying remotes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-11-13T19:58:37Z","receivedAt":"2026-11-13T19:58:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Couder <christian.couder@gmail.com> writes:\n\n> First in https://git.github.io/General-Microproject-Information/ we\n> have a \"Don’t work on a proposed project right away\" section, but\n> unfortunately this patch is addressing the main issue of a project we\n> are proposing.\n>\n> In general I think that there should be a design doc or a long\n> discussion before we start implementing something, because the problem\n> could be complex.\n\nThanks for clarification.  Perhaps you would want three tier set of\nprojects next year?  Microprojects to help you get your toes into\nthe community, middle sized projects to let you demonstrate how\ncapable you are to help you get chosen as an intern, and the real\nprojects?\n\n"}]}