1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-07 07:02:53 +03:00

getdeps: don't depend on git fetch depth any longer

Summary:
This commit takes advantage of git 2.5.0 being able to fetch a
requested revision rather than relying on the desired revision being within the
depth limited fetch.

This relies on having git 2.5.0 on the server which is true for all
of the projects we have manifests for; this shows zero matches:

```
$ rg repo_url opensource/fbcode_builder/manifests | grep -v github
```

We've had a couple of situations recently where folks have run into issues with
the commit rate in folly being higher than then fetch depth, so this should
address that.

Refs: https://github.com/facebook/watchman/issues/866

Reviewed By: fanzeyi

Differential Revision: D24747992

fbshipit-source-id: e9b67c61dddc9f55e05d8984e8d210e7d2faabcb
This commit is contained in:
Wez Furlong
2020-11-04 23:47:55 -08:00
committed by Facebook GitHub Bot
parent 6a971ed1ee
commit 061ce2fe6e

View File

@@ -203,7 +203,7 @@ class PreinstalledNopFetcher(SystemPackageFetcher):
class GitFetcher(Fetcher):
DEFAULT_DEPTH = 100
DEFAULT_DEPTH = 1
def __init__(self, build_options, manifest, repo_url, rev, depth):
# Extract the host/path portions of the URL and generate a flattened
@@ -262,7 +262,7 @@ class GitFetcher(Fetcher):
return ChangeStatus()
print("Updating %s -> %s" % (self.repo_dir, self.rev))
run_cmd(["git", "fetch", "origin"], cwd=self.repo_dir)
run_cmd(["git", "fetch", "origin", self.rev], cwd=self.repo_dir)
run_cmd(["git", "checkout", self.rev], cwd=self.repo_dir)
run_cmd(["git", "submodule", "update", "--init"], cwd=self.repo_dir)