Subject: [PATCH 0/2] for-each-repo: work correctly in a worktree

From: "Derrick Stolee via GitGitGadget" <[email-masked]>
Date: Tue, 24 Feb 2026 03:32:28 +0000

This was reported by Matthew [1] and is a quick fix.

[1]
https://lore.kernel.org/git/CABpCjbY=[email-masked]/

I also took the liberty of removing the_repository as I wanted to make sure
that wasn't involved here.

Thanks, -Stolee

Derrick Stolee (2):
  for-each-repo: stop using the_repository
  for-each-repo: work correctly in a worktree

 builtin/for-each-repo.c  | 10 ++++++----
 t/t0068-for-each-repo.sh | 22 +++++++++++++++++-----
 2 files changed, 23 insertions(+), 9 deletions(-)

base-commit: 67ad42147a7acc2af6074753ebd03d904476118f
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2056%2Fderrickstolee%2Ffor-each-repo-in-gitdir-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2056/derrickstolee/for-each-repo-in-gitdir-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2056
-- 
gitgitgadget