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

[Outreachy PATCH v3 0/2] checkout: make unique_tracking_name() use the given repository

From
OAOkhuomon Ajayi <okhuomonajayi54@gmail.com>
Date
Oct 23, 2026, 21:15 UTC
Message-ID
<20261023211533.73433-1-okhuomonajayi54@gmail.com>
In-Reply-To
<20261022105641.68963-1-okhuomonajayi54@gmail.com>

unique_tracking_name() takes a repository since v2, but it still went through the remotes with for_each_remote(), which only works with the_repository. As Junio pointed out, that gave the illusion that callers could pass any repository.

Patch 1 adds repo_for_each_remote(), which takes a repository, and keeps for_each_remote() as a wrapper that passes the_repository. Patch 2 is v2 with unique_tracking_name() using repo_for_each_remote(), so everything it reads comes from the given repository.

Changes since v2:
- New patch 1 adding repo_for_each_remote().
- unique_tracking_name() now uses it instead of for_each_remote().
- Dropped the sentence about for_each_remote() from the commit
  message of patch 2.
Okhuomon Ajayi (2):
  remote: add repo_for_each_remote()
  checkout: pass the repository to unique_tracking_name()
 builtin/checkout.c |  3 ++-
 builtin/worktree.c |  6 ++++--
 checkout.c         | 13 +++++++------
 checkout.h         |  4 +++-
 remote.c           | 14 ++++++++++----
 remote.h           |  2 ++
 6 files changed, 28 insertions(+), 14 deletions(-)
base-commit: c51408889c3b372814bc20b9431c3b74d0d268eb
-- 
2.56.0
Previous: Okhuomon AjayiNext: Okhuomon Ajayi
Message 8 of 14 in “checkout: use repository parameter in unique_tracking_name”
  1. checkout: use repository parameter in unique_tracking_nameOkhuomon Ajayi, Oct 17, 2026
  2. Usman AkinyemiOct 22, 2026
  3. Okhuomon AjayiOct 22, 2026
  4. checkout: pass the repository to unique_tracking_name()Okhuomon Ajayi, Oct 22, 2026
  5. Junio C HamanoOct 22, 2026
  6. Junio C HamanoOct 22, 2026
  7. Okhuomon AjayiOct 22, 2026
  8. 0/2 checkout: make unique_tracking_name() use the given repositoryOkhuomon Ajayi, Oct 23, 2026
  9. 1/2 remote: add repo_for_each_remote()Okhuomon Ajayi, Oct 23, 2026
  10. Christian CouderNov 3, 2026
  11. 2/2 checkout: pass the repository to unique_tracking_name()Okhuomon Ajayi, Oct 23, 2026
  12. 0/2 checkout: make unique_tracking_name() use the given repositoryOkhuomon Ajayi, Nov 4, 2026
  13. 1/2 remote: add repo_for_each_remote()Okhuomon Ajayi, Nov 4, 2026
  14. 2/2 checkout: pass the repository to unique_tracking_name()Okhuomon Ajayi, Nov 4, 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.