diff options
-rw-r--r-- | git_deps/detector.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git_deps/detector.py b/git_deps/detector.py index 1f470ee..4de1282 100644 --- a/git_deps/detector.py +++ b/git_deps/detector.py @@ -80,7 +80,10 @@ class DependencyDetector(object): return self.commits[rev] try: - self.commits[rev] = self.repo.revparse_single(rev) + commit = self.repo.revparse_single(rev) + if isinstance(commit, pygit2.Tag): + commit = commit.get_object() + self.commits[rev] = commit except (KeyError, ValueError): raise InvalidCommitish(rev) |