Now this is going to look really confusing at first, but bear with me.
Now, this is going to look really confusing at first, but bear with me.
In this document we'll cover only what is required to know for **both** modes.
In this document, we'll cover only what is required to know for **both** modes.
More specialised tutorials will be linked for each mode at the bottom of this page.
More specialized tutorials will be linked for each mode at the bottom of this page.
Let's start with the base(ics).
Let's start with the base(ics).
@ -52,10 +52,10 @@ smart_pull = true
In this snippet, we define `mode` to be `"workspace"`.
In this snippet, we define `mode` to be `"workspace"`.
`base.mode` in Malachite can only ever be one of `"workspace"` or `"repository"`, and defines, drumroll...
`base.mode` in Malachite can only ever be one of `"workspace"` or `"repository"`, and defines, drumroll…
The mode in which it operates. If it is set to anything but those 2 modes, it crashes.
The mode in which it operates. If it is set to anything but those 2 modes, it crashes.
Also defined in this snippet is `smart_pull`, which controls whether or not to pull... smartly.
Also defined in this snippet is `smart_pull`, which controls whether to pull… smartly.
What that actually means is that instead of just performing a simple `git pull` in each repository, Malachite
What that actually means is that instead of just performing a simple `git pull` in each repository, Malachite
will:
will:
@ -68,15 +68,15 @@ will:
Theoretically, this only actually speeds things up by a minute amount (think milliseconds, really). Where this feature shines however is in repository mode,
Theoretically, this only actually speeds things up by a minute amount (think milliseconds, really). Where this feature shines however is in repository mode,
where it enables helpful automation features such as `build_on_update`.
where it enables helpful automation features such as `build_on_update`.
Regardless, it's recommended to keep this enabled for the slight speedup, and only disable it if it causes issues.
Regardless, it's recommended to keep this enabled for the slight speed-up, and only disable it if it causes issues.
I've never personally had issues with it in the past, but who knows what could happen. This is Git we're talking about.
I've never personally had issues with it in the past, but who knows what could happen. This is Git we're talking about.
### Repositories Config
### Repositories Config
The repositories config is realistically what makes Malachite churn repo butter internally. It's the whole
The repositories config is realistically what makes Malachite churn repo butter internally. It's the whole
purpose of what it does, and because of that we've tried to come up with a neat little system so as to help
purpose of what it does, and because of that we've tried to come up with a neat little system to help
facilitate many packages without having to type each url out a million times.
facilitate many packages without having to type each URL out a million times.
```toml
```toml
[repositories]
[repositories]
@ -93,9 +93,9 @@ bar = "https://example.org/other/{}.git"
```
```
The way this works is simple:
The way this works is simple:
- We have 2 urls in the `repositories.urls` key.
- We have 2 URLs in the `repositories.urls` key.
- Each `repo` in the `repositories.repos` key is prefixed with an identifier.
- Each `repo` in the `repositories.repos` key is prefixed with an identifier.
- If the number is `foo`, it'll insert the url with the id `foo`.
- If the number is `foo`, it'll insert the URL with the id `foo`.
- Specifically, in the URL, it'll insert the defined `repo`'s name in place of the `%repo%` substring.
- Specifically, in the URL, it'll insert the defined `repo`'s name in place of the `%repo%` substring.
#### Hang on, what are the special symbols????
#### Hang on, what are the special symbols????
@ -125,3 +125,4 @@ Functioning config examples for both modes are available in the [examples](../ex
### Usage
### Usage
Alternatively, you can look at the [Usage](USAGE.md) guide!
Alternatively, you can look at the [Usage](USAGE.md) guide!