From: Cody P Schafer <dev@codyps.com>
To: bitbake-devel@lists.openembedded.org
Cc: Cody P Schafer <dev@codyps.com>
Subject: [PATCH] git: allow use of HEAD
Date: Tue, 11 Nov 2014 20:26:16 -0500 [thread overview]
Message-ID: <1415755576-4571-1-git-send-email-dev@codyps.com> (raw)
---
lib/bb/fetch2/git.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 66a77a8..84c7268 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -339,7 +339,9 @@ class Git(FetchMethod):
"""
Compute the HEAD revision for the url
"""
- if ud.unresolvedrev[name][:5] == "refs/":
+ if ud.unresolvedrev[name] == "HEAD":
+ search = "%s %s^{}" % (ud.unresolvedrev[name], ud.unresolvedrev[name])
+ elif ud.unresolvedrev[name][:5] == "refs/":
search = "%s %s^{}" % (ud.unresolvedrev[name], ud.unresolvedrev[name])
else:
search = "refs/heads/%s refs/tags/%s^{}" % (ud.unresolvedrev[name], ud.unresolvedrev[name])
--
2.1.3
next reply other threads:[~2014-11-12 1:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-12 1:26 Cody P Schafer [this message]
2014-11-27 9:20 ` [PATCH] git: allow use of HEAD Peter Kjellerstedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415755576-4571-1-git-send-email-dev@codyps.com \
--to=dev@codyps.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox