From: Simon Hausmann Date: Thu, 21 Jun 2007 22:01:57 +0000 (+0200) Subject: Make it possible to specify the HEAD for the internal findUpstreamBranchPoint function. X-Git-Url: http://crossforests.com/gitweb?a=commitdiff_plain;h=ee45a2dc4920e38aaaf85d27a0b987fbdead6c2d;p=python%2Ffast-export.git 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 --- diff --git a/git-p4 b/git-p4 index 16de15c..54a05eb 100755 --- a/git-p4 +++ b/git-p4 @@ -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"):