MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / _git_get_branch

Function _git_get_branch

setup.py:280–294  ·  view source on GitHub ↗
( directory)

Source from the content-addressed store, hash-verified

278
279
280def _git_get_branch( directory):
281 command = f'cd {directory} && git branch --show-current'
282 log( f'Running: {command}')
283 p = subprocess.run(
284 command,
285 shell=True,
286 check=False,
287 text=True,
288 stdout=subprocess.PIPE,
289 )
290 ret = None
291 if p.returncode == 0:
292 ret = p.stdout.strip()
293 log( f'Have found MuPDF git branch: ret={ret!r}')
294 return ret
295
296
297def tar_check(path, mode='r:gz', prefix=None, remove=False):

Callers

nothing calls this directly

Calls 2

logFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…