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

Function p4PathStartsWith

git-p4.py:1363–1374  ·  view source on GitHub ↗

This method tries to remedy a potential mixed-case issue: If UserA adds //depot/DirA/file1 and UserB adds //depot/dira/file2 we may or may not have a problem. If you have core.ignorecase=true, we treat DirA and dira as the same directory.

(path, prefix)

Source from the content-addressed store, hash-verified

1361
1362
1363def p4PathStartsWith(path, prefix):
1364 """This method tries to remedy a potential mixed-case issue:
1365
1366 If UserA adds //depot/DirA/file1
1367 and UserB adds //depot/dira/file2
1368
1369 we may or may not have a problem. If you have core.ignorecase=true,
1370 we treat DirA and dira as the same directory.
1371 """
1372 if gitConfigBool("core.ignorecase"):
1373 return path.lower().startswith(prefix.lower())
1374 return path.startswith(prefix)
1375
1376
1377def getClientSpec():

Callers 6

prepareSubmitTemplateMethod · 0.85
isPathWantedMethod · 0.85
stripRepoPathMethod · 0.85
hasBranchPrefixMethod · 0.85
getBranchMappingMethod · 0.85

Calls 1

gitConfigBoolFunction · 0.85

Tested by

no test coverage detected