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

Method p4UserForCommit

git-p4.py:1926–1937  ·  view source on GitHub ↗

Return the tuple (perforce user,git email) for a given git commit id.

(self, id)

Source from the content-addressed store, hash-verified

1924 print("Patched up RCS keywords in %s" % file)
1925
1926 def p4UserForCommit(self, id):
1927 """Return the tuple (perforce user,git email) for a given git commit
1928 id.
1929 """
1930 self.getUserMapFromPerforceServer()
1931 gitEmail = read_pipe(["git", "log", "--max-count=1",
1932 "--format=%ae", id])
1933 gitEmail = gitEmail.strip()
1934 if gitEmail not in self.emails:
1935 return (None, gitEmail)
1936 else:
1937 return (self.emails[gitEmail], gitEmail)
1938
1939 def checkValidP4Users(self, commits):
1940 """Check if any git authors cannot be mapped to p4 users."""

Callers 2

checkValidP4UsersMethod · 0.95
applyCommitMethod · 0.95

Calls 2

read_pipeFunction · 0.85

Tested by

no test coverage detected