From d5e213755f138ab95a00090e6431c948ce6eee36 Mon Sep 17 00:00:00 2001 From: no92 Date: Tue, 11 Apr 2023 14:23:55 +0200 Subject: [PATCH] vcs: warn about ambiguity of having both `branch` and `tag` --- xbstrap/base.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xbstrap/base.py b/xbstrap/base.py index 508030f..939736f 100644 --- a/xbstrap/base.py +++ b/xbstrap/base.py @@ -736,6 +736,12 @@ def __init__(self, cfg, induced_name, yml): else: self._name = induced_name + if "git" in self._this_yml: + if "branch" in self._this_yml and "tag" in self._this_yml: + _util.log_err( + f"source '{self._name}' has both a tag and a branch; this is ambiguous" + ) + if "regenerate" in self._this_yml: for step_yml in self._this_yml["regenerate"]: self._regenerate_steps.append(ScriptStep(step_yml))