Skip to content

Commit

Permalink
Make it possible to specify the HEAD for the internal findUpstreamBra…
Browse files Browse the repository at this point in the history
…nchPoint 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>
  • Loading branch information
Simon Hausmann authored and Simon Hausmann committed Jun 21, 2007
1 parent 09d89de commit 9ceab36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down

0 comments on commit 9ceab36

Please sign in to comment.