diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 526668bc23..59827e304f 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -350,9 +350,10 @@ class Git(FetchMethod): | |||
350 | head = "refs/heads/%s" % ud.unresolvedrev[name] | 350 | head = "refs/heads/%s" % ud.unresolvedrev[name] |
351 | tag = "refs/tags/%s" % ud.unresolvedrev[name] | 351 | tag = "refs/tags/%s" % ud.unresolvedrev[name] |
352 | for s in [head, tag + "^{}", tag]: | 352 | for s in [head, tag + "^{}", tag]: |
353 | for l in output.split('\n'): | 353 | for l in output.strip().split('\n'): |
354 | if s in l: | 354 | sha1, ref = l.split() |
355 | return l.split()[0] | 355 | if s == ref: |
356 | return sha1 | ||
356 | raise bb.fetch2.FetchError("Unable to resolve '%s' in upstream git repository in git ls-remote output for %s" % \ | 357 | raise bb.fetch2.FetchError("Unable to resolve '%s' in upstream git repository in git ls-remote output for %s" % \ |
357 | (ud.unresolvedrev[name], ud.host+ud.path)) | 358 | (ud.unresolvedrev[name], ud.host+ud.path)) |
358 | 359 | ||