Next: , Previous: , Up: Getting Started   [Contents][Index]

3.2 Initial Pull

To start using Forge in a certain repository visit the Magit status buffer for that repository and type f y (forge-pull). Alternatively, you can use M-x forge-add-repository, which makes it possible to add a forge repository without pulling all topics and even without having to clone the respective Git repository.

You must set up a token before you can add the first repository. See Token Creation.

The first time forge-pull is run in a repository, an entry for that repository is added to the database and a new value is added to the Git variable remote.<remote>.fetch, which fetches all pull-requests. (+refs/pull/*/head:refs/pullreqs/* for Github)

forge-pull then fetches topics and other information using the forge’s API and pull-request references using Git.

The initial fetch can take a while but most of that is done asynchronously. Storing the information in the database is done synchronously though, so there can be a noticeable hang at the end. Subsequent fetches are much faster.

Fetching issues from Github is much faster than fetching from other forges because making a handful of GraphQL requests is much faster than making hundreds of REST requests.