diff --git a/revup/git.py b/revup/git.py index d2a44be..cfd096b 100644 --- a/revup/git.py +++ b/revup/git.py @@ -344,7 +344,9 @@ async def rev_list( @lru_cache(maxsize=None) async def is_branch_or_commit(self, obj: str) -> bool: - return await self.git_return_code("rev-parse", "--verify", "--quiet", obj) == 0 + return ( + await self.git_return_code("rev-parse", "--verify", "--quiet", obj + "^{commit}") == 0 + ) async def verify_branch_or_commit(self, obj: str) -> None: if not await self.is_branch_or_commit(obj):