All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] bitbake: fetch2/git: Anchor names when using ls-remote
@ 2014-01-20 16:45 Richard Purdie
  2014-01-20 20:46 ` [PATCH v3] " Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2014-01-20 16:45 UTC (permalink / raw)
  To: bitbake-devel

When specifying tags, they're searched for unanchored so foo/bar could
match:

refs/heads/abc/foo/bar
refs/heads/xyz/foo/bar
refs/heads/foo/bar

This change anchors the expressions so they are based against heads
or tags.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index ed55f43..3620143 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -326,7 +326,7 @@ class Git(FetchMethod):
         else:
             username = ""
 
-        cmd = "%s ls-remote %s://%s%s%s %s^{}" % \
+        cmd = "%s ls-remote %s://%s%s%s refs/heads/%s^{} refs/tags/%s^{}" % \
               (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.unresolvedrev[name])
         if ud.proto.lower() != 'file':
             bb.fetch2.check_network_access(d, cmd)




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-20 20:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-20 16:45 [PATCH v2] bitbake: fetch2/git: Anchor names when using ls-remote Richard Purdie
2014-01-20 20:46 ` [PATCH v3] " Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.