-
-
Notifications
You must be signed in to change notification settings - Fork 954
Equivalent to git tag --contains <commit>
#1269
Answered
by
Byron
bytefluxio
asked this question in
Q&A
-
What would be the gitpython equivalent of git tag --contains <commit>
I need to ascertain all tags that point to descendants of a commit. The git command is incredibly fast, but doing the following just isn't effective:
tags = []
for tag in self.repo.tags:
if self.repo.is_ancestor(git_hash, tag.commit):
tags.append(tag)
Beta Was this translation helpful? Give feedback.
All reactions
Answered by
Byron
Jun 10, 2021
I would go with self.repo.git.tag(contains=commit)
.
Replies: 1 comment
-
I would go with self.repo.git.tag(contains=commit)
.
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Answer selected by
Byron
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment