Skip to contentSkip to conversation

git: allow use of HEAD

PATCH New Cody P Schafer 1 participant 1 message Jun 1, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 git: allow use of HEAD

Especially useful in the case where one has local git repositories that they point bitbake at via bbappends for development purposes.

---
 lib/bb/fetch2/git.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/fetch2/git.py +1 -1
index 0fd9bee..161a2db 100644
@@ -342,7 +342,7 @@ class Git(FetchMethod):
         """
         output = self._lsremote(ud, d, "")
         # Tags of the form ^{} may not work, need to fallback to other form
-        if ud.unresolvedrev[name][:5] == "refs/":
+        if ud.unresolvedrev[name][:5] == "refs/" or ud.unresolvedrev[name] == "HEAD":
             head = ud.unresolvedrev[name]
             tag = ud.unresolvedrev[name]
         else:
Signature · 1 line
2.4.1