summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/fetch/git.py')
-rw-r--r--lib/bb/fetch/git.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bb/fetch/git.py b/lib/bb/fetch/git.py
index dbf8f3aa2..62bd2202e 100644
--- a/lib/bb/fetch/git.py
+++ b/lib/bb/fetch/git.py
@@ -134,7 +134,12 @@ class Git(Fetch):
"""
Compute the HEAD revision for the url
"""
- output = runfetchcmd("git ls-remote %s://%s%s %s" % (ud.proto, ud.host, ud.path, ud.branch), d, True)
+ if ud.user:
+ username = ud.user + '@'
+ else:
+ username = ""
+
+ output = runfetchcmd("git ls-remote %s://%s%s%s %s" % (ud.proto, username, ud.host, ud.path, ud.branch), d, True)
return output.split()[0]
def _build_revision(self, url, ud, d):