Hi Ludwig, On Tue, 5 May 2026 at 02:25, Ludwig Nussel <[email protected]> wrote: > > On 5/4/26 14:31, Simon Glass wrote: > > On 2026-04-29T12:18:51, Ludwig Nussel <[email protected]> wrote: > >> patman: fix use in worktree > >> > >> When using a worktree '.git' actually is a file and pygit2 > >> init_repository() does not like that. The intention is not to create > >> a new git repo anyway so use normal constructor instead of > >> init_repository(). > >> > >> Signed-off-by: Ludwig Nussel <[email protected]> > >> > >> tools/patman/cser_helper.py | 4 ++-- > >> tools/patman/cseries.py | 6 +++--- > >> 2 files changed, 5 insertions(+), 5 deletions(-) > > > >> diff --git a/tools/patman/cser_helper.py b/tools/patman/cser_helper.py > >> @@ -309,7 +309,7 @@ class CseriesHelper: > >> self._copy_db_fields_to(series, ser) > >> msg = None > >> if end: > >> - repo = pygit2.init_repository(self.gitdir) > >> + repo = pygit2.Repository(self.gitdir) > > > > Thanks for tracking this down. > > > > There are more init_repository(self.gitdir) call sites have landed in > > cser_helper.py and cseries.py - please can you convert those too, > > otherwise the worktree case will still be broken on those paths. > > In which branch? In master I can only see init_repository() references > in tests.
This is in the master branch at https://gitlab.denx.de/u-boot/u-boot.git : $ git grep init_repos tools/patman/cser_helper.py: repo = pygit2.init_repository(self.gitdir) tools/patman/cser_helper.py: repo = pygit2.init_repository(self.gitdir) tools/patman/cseries.py: repo = pygit2.init_repository(self.gitdir) tools/patman/cseries.py: repo = pygit2.init_repository(self.gitdir) tools/patman/cseries.py: repo = pygit2.init_repository(self.gitdir) (I've omitted the 'test' ones) Regards, Simon

