default to main branch

Summary:
Most referenced repos have moved from master to main as default branch, so flip the default in getdeps.

As well as tidying things up, this means more manifests will be able to use the pinned git commit hash for a dependency that shipit generates (e.g. build/deps/github_hashes/facebook/folly-rev.txt). This is because a "rev = " setting in the manifest is treated as a dynamic override in GitFetcher.__init__ and this diff reduces the number of such overrides.

Reviewed By: StanislavGlebik

Differential Revision: D32567564

fbshipit-source-id: 3f1b734eb1bb0f5dbafb01ceb935a3d51b8dcc9a
This commit is contained in:
Alex Hornby 2021-11-22 14:05:09 -08:00 committed by Facebook GitHub Bot
parent 56dbf182e3
commit 1088dff5cd
9 changed files with 4 additions and 8 deletions

View File

@ -234,7 +234,7 @@ class GitFetcher(Fetcher):
rev = m.group(1)
print("Using pinned rev %s for %s" % (rev, repo_url))
self.rev = rev or "master"
self.rev = rev or "main"
self.origin_repo = repo_url
self.manifest = manifest
self.depth = depth if depth else GitFetcher.DEFAULT_DEPTH
@ -252,7 +252,7 @@ class GitFetcher(Fetcher):
)
if target_hash == current_hash:
# It's up to date, so there are no changes. This doesn't detect eg:
# if origin/master moved and rev='master', but that's ok for our purposes;
# if origin/main moved and rev='main', but that's ok for our purposes;
# we should be using explicit hashes or eg: a stable branch for the cases
# that we care about, and it isn't unreasonable to require that the user
# explicitly perform a clean build if those have moved. For the most

View File

@ -6,6 +6,7 @@ shipit_fbcode_builder = true
[git]
repo_url = https://github.com/facebookexternal/f4d.git
rev = master
[build.os=windows]
builder = nop

View File

@ -6,7 +6,6 @@ shipit_fbcode_builder = true
[git]
repo_url = https://github.com/facebookincubator/fb303.git
rev = main
[build]
builder = cmake

View File

@ -6,7 +6,6 @@ shipit_fbcode_builder = false
[git]
repo_url = https://github.com/facebook/fb303.git
rev = main
[build]
builder = nop

View File

@ -6,7 +6,6 @@ shipit_fbcode_builder = true
[git]
repo_url = https://github.com/facebook/fboss.git
rev = main
[build.os=linux]
builder = cmake

View File

@ -6,7 +6,6 @@ shipit_fbcode_builder = true
[git]
repo_url = https://github.com/facebookincubator/fizz.git
rev = main
[build]
builder = cmake

View File

@ -6,7 +6,6 @@ shipit_fbcode_builder = true
[git]
repo_url = https://github.com/facebook/openr.git
rev = main
[build.os=linux]
builder = cmake

View File

@ -9,6 +9,7 @@ libprotobuf-dev
[git]
repo_url = https://github.com/protocolbuffers/protobuf.git
rev = master
[build.not(os=windows)]
builder = autoconf

View File

@ -6,7 +6,6 @@ shipit_fbcode_builder = true
[git]
repo_url = https://github.com/facebook/wangle.git
rev = main
[build]
builder = cmake