From 9785eb55604f132651825121b609c2d7d27d5719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Wed, 28 Dec 2016 15:34:41 +0000 Subject: [PATCH] Exclude annotated tags when importing. --- dulwich/porcelain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dulwich/porcelain.py b/dulwich/porcelain.py index 04a7b8ce3..8a07d9cad 100644 --- a/dulwich/porcelain.py +++ b/dulwich/porcelain.py @@ -278,7 +278,7 @@ def clone(source, target=None, bare=False, checkout=None, r.refs.import_refs( b'refs/tags', {n[len(b'refs/tags/'):]: v for (n, v) in remote_refs.items() - if n.startswith(b'refs/tags/')}) + if n.startswith(b'refs/tags/') and not n.endswith(b'^{}')}) r[b"HEAD"] = remote_refs[b"HEAD"] if checkout: errstream.write(b'Checking out HEAD\n')