From: Jan Kiszka <
jan.k...@siemens.com>
Repos without URL are local ones and a are not version-controlled from
kas perspective. Do not warn if they appear to be unpinned, e.g. due to
getting a branch via a default assignment.
Reported-by: Frieder Schrempf <
frieder....@kontron.de>
Fixes: 397b10d5fab5 ("repos: Warn about repos with branches but without commit or lock file")
Signed-off-by: Jan Kiszka <
jan.k...@siemens.com>
---
kas/repos.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kas/repos.py b/kas/repos.py
index d2f233f..60bfd9a 100644
--- a/kas/repos.py
+++ b/kas/repos.py
@@ -298,7 +298,7 @@ class Repo:
'Unsupported mixture of legacy refspec and '
f'commit/tag/branch for repository "{name}"')
refspec = repo_overrides.get('commit', refspec)
- if not commit and name not in Repo.__no_commit_warned__ \
+ if url and not commit and name not in Repo.__no_commit_warned__ \
and get_context().unpinned_repo_warnings:
if tag:
logging.warning('Using tag without commit for repository '
--
2.47.3