[oe-commits] [bitbake] 06/07: fetch2/git: _revision_key: collapse adjacent slashes

git at git.openembedded.org git at git.openembedded.org
Sun Jan 19 13:32:56 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository bitbake.

commit 425e21c14955dd38868c6e97637df3bbe0f89fac
Author: Chris Laplante <chris.laplante at agilent.com>
AuthorDate: Thu Jan 16 11:28:04 2020 -0500

    fetch2/git: _revision_key: collapse adjacent slashes
    
    >From a SRCREV caching point of view, there is no reason to treat the
    following upstreams as different:
    
        SRC_URI = "git://github.com/file/file.git"
        SRC_URI = "git://github.com//file/file.git"
    
    Signed-off-by: Chris Laplante <chris.laplante at agilent.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 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 fe0a384..5b3793a 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -594,7 +594,9 @@ class Git(FetchMethod):
         """
         Return a unique key for the url
         """
-        return "git:" + ud.host + ud.path.replace('/', '.') + ud.unresolvedrev[name]
+        # Collapse adjacent slashes
+        slash_re = re.compile(r"/+")
+        return "git:" + ud.host + slash_re.sub(".", ud.path) + ud.unresolvedrev[name]
 
     def _lsremote(self, ud, d, search):
         """

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list