MCPcopy Create free account
hub / github.com/ClangBuiltLinux/tc-build / ref_exists

Method ref_exists

tc_build/source.py:136–141  ·  view source on GitHub ↗
(self, ref: str)

Source from the content-addressed store, hash-verified

134 return Path(git_dir, 'shallow').exists()
135
136 def ref_exists(self, ref: str) -> bool:
137 try:
138 self.git(['show-branch', ref])
139 except subprocess.CalledProcessError:
140 return False
141 return True
142
143 def update(self, ref: str) -> None:
144 tc_build.utils.print_header(f"Updating {self._pretty_name}")

Callers 1

updateMethod · 0.95

Calls 1

gitMethod · 0.95

Tested by

no test coverage detected