summaryrefslogtreecommitdiff
path: root/contrib/fast-import
diff options
context:
space:
mode:
authorSimon Hausmann <shausman@trolltech.com>2007-06-21 22:01:57 (GMT)
committerSimon Hausmann <simon@lst.de>2007-06-21 22:00:34 (GMT)
commit9ceab36375dfd4088b265033e1de9225b3527cab (patch)
tree9a0e9944ed8551bdb6f4629091d5489d7bf80ace /contrib/fast-import
parent09d89de2e31ed4d62b6ff344e9ad9ef29550121b (diff)
downloadgit-9ceab36375dfd4088b265033e1de9225b3527cab.zip
git-9ceab36375dfd4088b265033e1de9225b3527cab.tar.gz
git-9ceab36375dfd4088b265033e1de9225b3527cab.tar.bz2
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>
Diffstat (limited to 'contrib/fast-import')
-rwxr-xr-xcontrib/fast-import/git-p44
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 16de15c..54a05eb 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/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"):