diff --git a/blink/tools/blinkpy/common/checkout/git.py b/blink/tools/blinkpy/common/checkout/git.py index 62452e86cb1..6343c2122e4 100644 --- a/blink/tools/blinkpy/common/checkout/git.py +++ b/blink/tools/blinkpy/common/checkout/git.py @@ -201,6 +201,10 @@ def current_branch(self): return '' return self._branch_from_ref(ref) + def current_revision(self): + """Return the commit hash of HEAD.""" + return self.run(['rev-parse', 'HEAD']).strip() + def _upstream_branch(self): current_branch = self.current_branch() return self._branch_from_ref(