Skip to content

Commit 4725fac

Browse files
jbower-fbmeta-codesync[bot]
authored andcommitted
Make getdeps Git fetcher use branch in directory name to avoid clashes
Summary: If we have two manifests which checkout from the same repository but at different branches, one of them will break when reusing the same checkout in the getdeps cache. This is because we only do a shallow checkout but default and so only the branch originally used to populatd the cache is available. Reviewed By: alexmalyshev Differential Revision: D87041221 fbshipit-source-id: f54cdbc1392c791d9da3ad3bb3236c354e2a0837
1 parent 1920d2b commit 4725fac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

build/fbcode_builder/getdeps/fetcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def __init__(self, build_options, manifest, repo_url, rev, depth, branch) -> Non
223223
# directory name. eg:
224224
# github.com/facebook/folly.git -> github.com-facebook-folly.git
225225
url = urlparse(repo_url)
226-
directory = "%s%s" % (url.netloc, url.path)
226+
directory = "%s%s%s" % (url.netloc, url.path, branch if branch else "")
227227
for s in ["/", "\\", ":"]:
228228
directory = directory.replace(s, "-")
229229

0 commit comments

Comments
 (0)