1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-03 22:28:09 +02:00

Make it possible to specify the HEAD for the internal findUpstreamBranchPoint function.

This isn't used right now in git-p4 but I use it in an external script that loads git-p4 as module.

Signed-off-by: Simon Hausmann <shausman@trolltech.com>
This commit is contained in:
Simon Hausmann 2007-06-22 00:01:57 +02:00 committed by Simon Hausmann
parent 09d89de2e3
commit 9ceab36375

View File

@ -168,12 +168,12 @@ def gitBranchExists(branch):
def gitConfig(key):
return read_pipe("git config %s" % key, ignore_error=True).strip()
def findUpstreamBranchPoint():
def findUpstreamBranchPoint(head = "HEAD"):
settings = None
branchPoint = ""
parent = 0
while parent < 65535:
commit = "HEAD~%s" % parent
commit = head + "~%s" % parent
log = extractLogMessageFromGitCommit(commit)
settings = extractSettingsGitLog(log)
if not settings.has_key("depot-paths"):