MCPcopy Index your code
hub / github.com/GitGuardian/ggshield / from_string

Method from_string

ggshield/core/scan/commit_utils.py:195–201  ·  view source on GitHub ↗
(header: str)

Source from the content-addressed store, hash-verified

193
194 @staticmethod
195 def from_string(header: str) -> "PatchHeader":
196 # First item returned by split() contains commit info and message, skip it
197 info, *lines = _RX_HEADER_FILE_LINE_SEPARATOR.split(header)
198 return PatchHeader(
199 info,
200 [PatchFileInfo.from_string(x) for x in lines],
201 )
202
203
204def parse_patch(

Callers 3

parse_patchFunction · 0.45
from_patch_headerMethod · 0.45

Calls 1

PatchHeaderClass · 0.85

Tested by 1