Skip to content

Commit c4e0a82

Browse files
authored
Merge pull request #1365 from EliahKagan/no-fixture-lfs
Edit CI and docs to reflect generated archives not needing LFS
2 parents 4ca7094 + 3283445 commit c4e0a82

File tree

4 files changed

+51
-58
lines changed

4 files changed

+51
-58
lines changed

.github/workflows/ci.yml

-3
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ jobs:
7979
- name: "cargo check default features"
8080
if: startsWith(matrix.os, 'windows')
8181
run: cargo check --all --bins --examples
82-
- run: |
83-
# it should never be a failure not to get the caches, as they can be regenerated.
84-
git lfs fetch && git lfs checkout || true
8582
- uses: taiki-e/install-action@v2
8683
with:
8784
tool: nextest

DEVELOPMENT.md

+28-29
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Development Guide
22

3-
## Practices
3+
## Practices
44

55
* **test-first development**
66
* protect against regression and make implementing features easy.
@@ -9,12 +9,12 @@
99
for the mundane things, like unhappy code paths.
1010
* *use git itself* as reference implementation, and use their test-cases and fixtures where
1111
appropriate. At the very least, try to learn from them.
12-
* Run the same test against git whenever feasible to assure git agrees with our implementation.
12+
* Run the same test against git whenever feasible to assure git agrees with our implementation.
1313
See `gix-glob` for examples.
1414
* *use libgit2* test fixtures and cases where appropriate, or learn from them.
1515
* **safety first**
1616
* handle all errors, never `unwrap()`. If needed, `expect("why")`.
17-
* provide an error chain and make it easy to understand what went wrong.
17+
* provide an error chain and make it easy to understand what went wrong.
1818
* We `thiserror` generally.
1919
* Adhere to the [stability guide](https://github.com/Byron/gitoxide/blob/main/STABILITY.md)
2020

@@ -28,10 +28,10 @@ The _subject_ usually informs about the *what* and the body provides details and
2828
Commit messages _must_ show up in the changelog in case of breaking changes. Examples for that are:
2929

3030
- change!: rename `Foo` to `Bar`. (#123)
31-
31+
3232
And this is why we do it in the body.
3333
- remove!: `Repository::obsolete()`.
34-
34+
3535
Nobody used this method.
3636

3737
Features or other changes that are visible and people should know about look like this:
@@ -48,7 +48,7 @@ Examples could be:
4848
- `make fmt`
4949
- thanks clippy
5050

51-
Please refrain from using `chore:` or `refactor:` prefixes as for the most part, users of the API don't care about those. When a `refactor`
51+
Please refrain from using `chore:` or `refactor:` prefixes as for the most part, users of the API don't care about those. When a `refactor`
5252
changes the API in some way, prefer to use `feat`, `change`, `rename` or `remove` instead, and most of the time the ones that are not `feat`
5353
are breaking so would be seen with their _exclamation mark_ suffix, like `change!`.
5454

@@ -63,20 +63,20 @@ Knowing that `cargo smart-release` is driven by commit messages and affects thei
6363
to split edits into multiple commits to clearly indicate which crate is actually broken.
6464

6565
Typical patterns include making a breaking change in one crate and then fix all others to work with it. For changelogs to look proper
66-
and version bumps to be correct, the first commit would contain only the breaking changes themselves,
66+
and version bumps to be correct, the first commit would contain only the breaking changes themselves,
6767
like "rename: `foo()` to `bar()`", and the second commit would contain all changes to adapt to that and look like "adapt to changes in `<crate name>`".
6868

6969
## Commit History
7070

71-
We generally follow a 'track everything' approach and there is a lot of freedom leading to more commits rather than less. There
71+
We generally follow a 'track everything' approach and there is a lot of freedom leading to more commits rather than less. There
7272
is no obligation to squash commits or to otherwise tune the history.
7373

7474
We use feature branches and PRs most of the time to be able to take advantage of CI and GitHub review tools, and merge with merge commits
75-
to make individual efforts stand out. There is no need for linearizing history or tuning it in any other way. However, each commit
75+
to make individual efforts stand out. There is no need for linearizing history or tuning it in any other way. However, each commit
7676
_must_ follow the guidelines laid out in the `Commit Messages` paragraph.
7777

7878
There is value in organizing commits by topic and [_Stacked Git_](https://stacked-git.github.io) is hereby endorsed to do that.
79-
79+
8080
## Configuration and overrides
8181

8282
As a general rule, respect and implement all applicable [git-config](https://git-scm.com/docs/git-config) by default, but allow the
@@ -102,11 +102,11 @@ Parameters which are not available in git or specific to `gitoxide` or the needs
102102
* **User Interfaces**
103103
* User interfaces can greatly benefit from using async as it's much easier to maintain a responsive UI thread that way thanks
104104
to the wonderful future combinators.
105-
* `blocking` can be used to make `Read` and `Iterator` async, or move any operation onto a thread which blends it into the
106-
async world.
105+
* `blocking` can be used to make `Read` and `Iterator` async, or move any operation onto a thread which blends it into the
106+
async world.
107107
* Most operations are fast and 'interrupting' them is as easy as ignoring their result by cancelling their task.
108108
* Long-running operations can be roughly interacted with using `gix_features::interrupt::trigger()` function, and after a moment
109-
of waiting the flag can be unset with the `…::uninterrupt()` function to allow new long-running operations to work.
109+
of waiting the flag can be unset with the `…::uninterrupt()` function to allow new long-running operations to work.
110110
Every long running operation supports this.
111111
* **server-side**
112112
* ~~Building a pack is CPU and at some point, IO bound, and it makes no sense to use async to handle more connections - git
@@ -119,15 +119,15 @@ Parameters which are not available in git or specific to `gitoxide` or the needs
119119
* **Why not use it to generate blocking versions of traits automatically?**
120120
* This would require `maybe_async` and its dependencies to always be present, increasing compile times. For now we chose a little more code to handle
121121
over increasing compile times for everyone. This stance may change later once compile times don't matter that much anymore to allow the removal of code.
122-
122+
123123
* **`Default` trait implementations**
124124
* These can change only if the effect is contained within the callers process.
125125
This means **changing the default of a file version** is a **breaking change**.
126126
* **Using the `Progress` trait**
127127
* When receiving a `Progress` implementation
128128
* without calling `add_child(…)` then use it directly to communicate progress, leaving
129129
control of the name to the caller. However, call `.init(…)` to configure the iteration.
130-
* and when calling `add_child(…)` don't use the parent progress instance for anything else.
130+
* and when calling `add_child(…)` don't use the parent progress instance for anything else.
131131
* **interruption of long-running operations**
132132
* Use `gix-features::interrupt::*` for building support for interruptions of long-running operations only.
133133
* It's up to the author to decide how to best integrate it, generally we use a poll-based mechanism to check whether
@@ -136,9 +136,9 @@ Parameters which are not available in git or specific to `gitoxide` or the needs
136136
* …temporary resources like files might otherwise be leaked.
137137
* **this is optional but desirable if…**
138138
* …there is no leakage otherwise to support user interfaces. They background long-running operations and need them to be cancellable.
139-
139+
140140
* **prepare for SHA256 support by using `gix_hash::ObjectId` and `gix_hash::oid`**
141-
* eventually there will be the need to support both Sha1 and Sha256. We anticipate it by using the `Id` type instead
141+
* eventually there will be the need to support both Sha1 and Sha256. We anticipate it by using the `Id` type instead
142142
of slices or arrays of 20 bytes. This way, eventually we can support multiple hash digest sizes.
143143
* Right now it's unclear how Sha256 is going to work in git, so we only support Sha1 for now. It might be an avenue to proactively
144144
implement it ahead of time once there is a specification to follow.
@@ -166,7 +166,7 @@ Parameters which are not available in git or specific to `gitoxide` or the needs
166166
- Assuming UTF8-ish bytes in paths produced by `git` even on windows due to `MSYS2`, we use `os_str_bytes` to convert these back into `OsStr` and derivatives like `Path`
167167
as needed even though it might not always be the case depending on the actual encoding used by `MSYS2` or other abstraction layers, or avoiding to use std types altogether
168168
using our own instead.
169-
169+
170170
## Sha256
171171

172172
A bunch of notes collected to keep track of what's needed to eventually support it
@@ -181,7 +181,7 @@ A bunch of notes collected to keep track of what's needed to eventually support
181181
* don't use unwrap, not even in tests. Instead use `quick_error!()` or `Box<dyn std::error::Error>`.
182182
* Use `expect(…)` as assertion on Options, providing context on *why* the expectations should hold. Or in other words,
183183
answer "This should work _because_…<expect(…)>"
184-
184+
185185
## `Options` vs `Context`
186186

187187
- Use `Options` whenever there is something to configure in terms of branching behaviour. It can be defaulted, and if it can't these fields should be parameters of the method
@@ -195,7 +195,7 @@ In _plumbing_ crates, prefer to default to keeping references if this is feasibl
195195
In _porcelain_ crates, like `gix`, we have `Platforms` which are typically cheap enough to create on demand as they configure one or more method calls. These
196196
should keep a reference to the `Repository` instance that created them as the user is expected to clone the `Repository` if there is the need.
197197
However, if these structures are more expensive, call them `Cache` or `<NotPlatform>` and prefer to clone the `Repository` into them or otherwise keep them free of lifetimes
198-
to allow the user to keep this structure around for repeated calls. References for this paragraph are [this PR](https://github.com/Canop/bacon/pull/98) and
198+
to allow the user to keep this structure around for repeated calls. References for this paragraph are [this PR](https://github.com/Canop/bacon/pull/98) and
199199
[this discussion](https://github.com/Byron/gitoxide/discussions/675).
200200

201201
## Examples, Porcelain CLI and Plumbing CLI - which does what?
@@ -240,12 +240,12 @@ by humans.
240240
* make it compile quickly, so no extras
241241
* **Examples**
242242
* An implementation of ideas for actual occasional use and the first step towards getting integrated into Porcelain or Plumbing CLIs.
243-
* Proper command-line parsing with Clap.
244-
* No tests or progress.
245-
* High quality Rust code along with idiomatic `gitoxide` usage so people can learn from it.
246-
* **Plumbing CLI**
243+
* Proper command-line parsing with Clap.
244+
* No tests or progress.
245+
* High quality Rust code along with idiomatic `gitoxide` usage so people can learn from it.
246+
* **Plumbing CLI**
247247
* Use Clap AND Argh for command-line parsing via feature toggles to allow for tiny builds as plumbing is mostly for scripts.
248-
* Journey tests
248+
* Journey tests
249249
* Progress can be turned on using the `--verbose` flag, quiet by default.
250250
* Examples can be turned into plumbing by adding journey tests and `argh` command-line parsing, as well as progress.
251251
* **Porcelain CLI**
@@ -262,9 +262,8 @@ get an overview.
262262

263263
## Reviewing PRs
264264

265-
- be sure to clone locally and run tests with `GIX_TEST_IGNORE_ARCHIVES=1` to assure new fixture scripts (if there are any) are validated
266-
on _MacOS_ and _Windows_. Note that linux doesn't need to be tested that way as CI on linux ignores them by merit of not checking them out
267-
via `gix-lfs`.
265+
- Be sure to clone locally and run tests with `GIX_TEST_IGNORE_ARCHIVES=1` to assure new fixture scripts (if there are any) are validated
266+
on _MacOS_ and _Windows_. Linux doesn't need to be tested locally that way, as CI on Linux includes it.
268267

269268
## Creating a release
270269

@@ -309,5 +308,5 @@ GIT_SSH_COMMAND="ssh -VVV" \
309308
git <command>
310309
```
311310

312-
Consider adding `GIT_TRACE2_PERF=1` (possibly add `GIT_TRACE2_PERF_BRIEF=1` for brevity) as well for statistics and variables
311+
Consider adding `GIT_TRACE2_PERF=1` (possibly add `GIT_TRACE2_PERF_BRIEF=1` for brevity) as well for statistics and variables
313312
(see [their source for more](https://github.com/git/git/blob/b50a608ba20348cb3dfc16a696816d51780e3f0f/trace2/tr2_sysenv.c#L50).

0 commit comments

Comments
 (0)