From: Okhuomon Ajayi Date: Fri, 23 Oct 2026 21:15:31 GMT Subject: [Outreachy PATCH v3 0/2] checkout: make unique_tracking_name() use the given repository 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