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>
Simon Hausmann committed
Jun 22, 2007 at 00:01 UTC
9ceab36375dfd4088b265033e1de9225b3527cab
1 file changed
+2
-2
contrib/fast-import/git-p4
+2
-2
@@ -168,12 +168,12 @@ def gitBranchExists(branch):
168
def gitConfig(key):
169
return read_pipe("git config %s" % key, ignore_error=True).strip()
170
171
-def findUpstreamBranchPoint():
171
+def findUpstreamBranchPoint(head = "HEAD"):
172
settings = None
173
branchPoint = ""
174
parent = 0
175
while parent < 65535:
176
- commit = "HEAD~%s" % parent
176
+ commit = head + "~%s" % parent
177
log = extractLogMessageFromGitCommit(commit)
178
settings = extractSettingsGitLog(log)
179
if not settings.has_key("depot-paths"):