| Index: scm.py
|
| diff --git a/scm.py b/scm.py
|
| index d60453dceff9c1e1362d0be94e368e2112619663..eb5c52403c3e2595d14b133a7d0d00e289811d10 100644
|
| --- a/scm.py
|
| +++ b/scm.py
|
| @@ -491,15 +491,12 @@
|
| sha = GIT.Capture(['rev-parse', lookup_rev], cwd=cwd).lower()
|
| if lookup_rev != rev:
|
| # Make sure we get the original 40 chars back.
|
| - if rev.lower() != sha:
|
| - return False
|
| + return rev.lower() == sha
|
| if sha_only:
|
| - if not sha.startswith(rev.lower()):
|
| - return False
|
| + return sha.startswith(rev.lower())
|
| + return True
|
| except subprocess2.CalledProcessError:
|
| return False
|
| - obj_type = GIT.Capture(['cat-file', '-t', rev], cwd=cwd).strip()
|
| - return obj_type == 'commit'
|
|
|
| @classmethod
|
| def AssertVersion(cls, min_version):
|
|
|