MCPcopy Index your code
hub / github.com/git/git / p4KeyWhichCanBeDirectlyDecoded

Function p4KeyWhichCanBeDirectlyDecoded

git-p4.py:845–858  ·  view source on GitHub ↗

Returns True if the key can be directly decoded as UTF-8 string Otherwise False. Keys which can not be encoded directly: - `data` which may contain arbitrary binary data - `desc` or `client` or `FullName` which may contain non-UTF8 encoded text - `depotFile[

(key)

Source from the content-addressed store, hash-verified

843
844
845def p4KeyWhichCanBeDirectlyDecoded(key):
846 """Returns True if the key can be directly decoded as UTF-8 string
847 Otherwise False.
848
849 Keys which can not be encoded directly:
850 - `data` which may contain arbitrary binary data
851 - `desc` or `client` or `FullName` which may contain non-UTF8 encoded text
852 - `depotFile[0-9]*`, `path`, or `clientFile` which may contain non-UTF8 encoded text, handled by decode_path()
853 """
854 if key in p4KeysContainingNonUtf8Chars() or \
855 key in p4KeysContainingBinaryData() or \
856 p4KeyContainsFilePaths(key):
857 return False
858 return True
859
860
861def p4CmdList(cmd, stdin=None, stdin_mode='w+b', cb=None, skip_info=False,

Callers 1

p4CmdListFunction · 0.85

Calls 3

p4KeyContainsFilePathsFunction · 0.85

Tested by

no test coverage detected