style: use import git_refs everywhere

Align with Google style guides and `import git_refs` as a module
rather than import symbols out of it.

Change-Id: I4e33ebdf3b06acd94494f32cdf39aa58427cd4b2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/648703
Reviewed-by: Brian Gan <brgan@google.com>
Commit-Queue: Mike Frysinger <vapier@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
Mike Frysinger authored and gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com committed 2026-10-27 02:00:11 -07:00
1 parent 8c316d7c98
commit 338ddb7d83
9 files changed
+144 -129

No files matched your search

+2 -2
View File
@@ -20,7 +20,7 @@ import traceback
import urllib.parse
import error
from git_refs import HEAD
import git_refs
# The API we've documented to hook authors. Keep in sync with repo-hooks.md.
@@ -142,7 +142,7 @@ class RepoHook:
# NOTE: Local (non-committed) changes will not be factored into this
# hash. I think this is OK, since we're really only worried about
# warning the user about upstream changes.
return self._hooks_project.work_git.rev_parse(HEAD)
return self._hooks_project.work_git.rev_parse(git_refs.HEAD)
def _GetMustVerb(self):
"""Return 'must' if the hook is required; 'should' if not."""