MCPcopy Create free account
hub / github.com/git/git / searchParent

Method searchParent

git-p4.py:3792–3804  ·  view source on GitHub ↗
(self, parent, branch, target)

Source from the content-addressed store, hash-verified

3790 return True
3791
3792 def searchParent(self, parent, branch, target):
3793 targetTree = read_pipe(["git", "rev-parse",
3794 "{}^{{tree}}".format(target)]).strip()
3795 for line in read_pipe_lines(["git", "rev-list", "--format=%H %T",
3796 "--no-merges", parent]):
3797 if line.startswith("commit "):
3798 continue
3799 commit, tree = line.strip().split(" ")
3800 if tree == targetTree:
3801 if self.verbose:
3802 print("Found parent of %s in commit %s" % (branch, commit))
3803 return commit
3804 return None
3805
3806 def importChanges(self, changes, origin_revision=0):
3807 cnt = 1

Callers 1

importChangesMethod · 0.95

Calls 2

read_pipeFunction · 0.85
read_pipe_linesFunction · 0.85

Tested by

no test coverage detected