MCPcopy Create free account
hub / github.com/ceph/ceph / _git_current_sha

Function _git_current_sha

src/script/build-with-container.py:315–322  ·  view source on GitHub ↗
(ctx, short=True)

Source from the content-addressed store, hash-verified

313
314
315def _git_current_sha(ctx, short=True):
316 args = ["rev-parse"]
317 if short:
318 args.append("--short")
319 args.append("HEAD")
320 cmd = _git_command(ctx, args)
321 res = _run(cmd, check=True, capture_output=True)
322 return res.stdout.decode("utf8").strip()
323
324
325def _sanitize_for_oci_tag(branch_name):

Callers 1

bc_find_srpmFunction · 0.85

Calls 4

_git_commandFunction · 0.85
_runFunction · 0.70
appendMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected