[PATCH] patman: fix use in worktree
Simon Glass
sjg at chromium.org
Mon May 4 14:31:04 CEST 2026
Hi Ludwig,
On 2026-04-29T12:18:51, Ludwig Nussel <ludwig.nussel at siemens.com> 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 <ludwig.nussel at siemens.com>
>
> 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.
> patman: fix use in worktree
nit: Please can you capitalise the first word: 'patman: Fix use in
worktree' - matched the rest of the patman history.
Regards,
Simon
More information about the U-Boot
mailing list