Felix Moessbauer
unread,May 17, 2024, 10:48:24 AMMay 17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to kas-...@googlegroups.com, jan.k...@siemens.com, ch...@wiggins.nz, Felix Moessbauer
On git clones, the fetching of tags need to be explicitly requested.
When requesting to fetch a tag, we previously fetched all tags and just
checked out the needed one. However, it is sufficient to only fetch the
requested one.
This is a preparation to support shallow clones.
Signed-off-by: Felix Moessbauer <
felix.mo...@siemens.com>
---
kas/repos.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kas/repos.py b/kas/repos.py
index 62b2bbd75..4b2b0c3e5 100644
--- a/kas/repos.py
+++ b/kas/repos.py
@@ -544,7 +544,7 @@ class GitRepo(RepoImpl):
def fetch_cmd(self):
cmd = ['git', 'fetch', '-q']
if self.tag:
- cmd.append('--tags')
+ cmd.extend(['origin', f'+{self.tag}:refs/tags/{self.tag}'])
branch = self.branch or self.refspec
if branch and branch.startswith('refs/'):
--
2.39.2