From e800d7c035d08631f35144f6880a48f92481ca96 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Fri, 20 Feb 2015 04:12:41 +0000 Subject: [PATCH] Tell fedmsg on dist-git to just ignore pygit2 Tag objects. --- roles/git/hooks/files/post-receive-fedmsg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/git/hooks/files/post-receive-fedmsg b/roles/git/hooks/files/post-receive-fedmsg index 2d6c44a3b9..db118156a2 100644 --- a/roles/git/hooks/files/post-receive-fedmsg +++ b/roles/git/hooks/files/post-receive-fedmsg @@ -88,6 +88,11 @@ for line in lines: def _build_commit(rev): commit = repo.revparse_single(rev) + # Tags are a little funny, and vary between versions of pygit2, so we'll + # just ignore them as far as fedmsg is concerned. + if isinstance(commit, pygit2.Tag): + return None + files, total = build_stats(commit) return dict(