[OE-core] [PATCH 1/5] oeqa.utils.git: use --verify in rev_parse()
Markus Lehtonen
markus.lehtonen at linux.intel.com
Mon May 15 11:18:41 UTC 2017
We use rev-parse for turning git object names into SHA-1 and checking
their existence. Using --verify option makes sure git-rev-parse does
what we expect.
Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
---
meta/lib/oeqa/utils/git.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/utils/git.py b/meta/lib/oeqa/utils/git.py
index e0cb3f0db2..757e3f0cbf 100644
--- a/meta/lib/oeqa/utils/git.py
+++ b/meta/lib/oeqa/utils/git.py
@@ -64,7 +64,7 @@ class GitRepo(object):
def rev_parse(self, revision):
"""Do git rev-parse"""
try:
- return self.run_cmd(['rev-parse', revision])
+ return self.run_cmd(['rev-parse', '--verify', revision])
except GitError:
# Revision does not exist
return None
--
2.12.0
More information about the Openembedded-core
mailing list