summaryrefslogtreecommitdiff
path: root/bitbake-dev/lib/bb/fetch/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake-dev/lib/bb/fetch/git.py')
-rw-r--r--bitbake-dev/lib/bb/fetch/git.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/bitbake-dev/lib/bb/fetch/git.py b/bitbake-dev/lib/bb/fetch/git.py
index aa26a500c..26f2b47f2 100644
--- a/bitbake-dev/lib/bb/fetch/git.py
+++ b/bitbake-dev/lib/bb/fetch/git.py
@@ -66,6 +66,11 @@ class Git(Fetch):
bb.msg.debug(1, bb.msg.domain.Fetcher, "%s already exists (or was stashed). Skipping git checkout." % ud.localpath)
return
+ if ud.user:
+ username = ud.user + '@'
+ else:
+ username = ""
+
gitsrcname = '%s%s' % (ud.host, ud.path.replace('/', '.'))
repofilename = 'git_%s.tar.gz' % (gitsrcname)
@@ -81,13 +86,13 @@ class Git(Fetch):
os.chdir(repodir)
runfetchcmd("tar -xzf %s" % (repofile), d)
else:
- runfetchcmd("git clone -n %s://%s%s %s" % (ud.proto, ud.host, ud.path, repodir), d)
+ runfetchcmd("git clone -n %s://%s%s%s %s" % (ud.proto, username, ud.host, ud.path, repodir), d)
os.chdir(repodir)
# Remove all but the .git directory
runfetchcmd("rm * -Rf", d)
- runfetchcmd("git fetch %s://%s%s %s" % (ud.proto, ud.host, ud.path, ud.branch), d)
- runfetchcmd("git fetch --tags %s://%s%s" % (ud.proto, ud.host, ud.path), d)
+ runfetchcmd("git fetch %s://%s%s%s %s" % (ud.proto, username, ud.host, ud.path, ud.branch), d)
+ runfetchcmd("git fetch --tags %s://%s%s%s" % (ud.proto, username, ud.host, ud.path), d)
runfetchcmd("git prune-packed", d)
runfetchcmd("git pack-redundant --all | xargs -r rm", d)