Skip to content

Commit c0fe3b0

Browse files
authored
Merge branch 'Byron:main' into main
2 parents 4a27e3a + 9c65d98 commit c0fe3b0

File tree

438 files changed

+4983
-1402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

438 files changed

+4983
-1402
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
groups:
8+
github-actions:
9+
patterns: ["*"]

.github/workflows/ci.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
runs-on: ubuntu-latest
3737
container: debian:buster
3838
steps:
39-
- uses: actions/checkout@v3
39+
- uses: actions/checkout@v4
4040
- name: Prerequisites
4141
run: apt-get update && apt-get install --no-install-recommends -y ca-certificates curl gcc libc-dev # gcc is required as OS abstraction
4242
- name: install Rust via Rustup
@@ -47,17 +47,17 @@ jobs:
4747
test:
4848
runs-on: ubuntu-latest
4949
steps:
50-
- uses: actions/checkout@v3
50+
- uses: actions/checkout@v4
5151
- uses: dtolnay/rust-toolchain@stable
5252
- uses: Swatinem/rust-cache@v2
5353
- name: Setup dependencies
5454
run:
5555
sudo apt-get install tree
56-
- uses: extractions/setup-just@v1
56+
- uses: extractions/setup-just@v2
5757
- name: test
5858
env:
5959
CI: true
60-
GITOXIDE_TEST_IGNORE_ARCHIVES: 1
60+
GIX_TEST_IGNORE_ARCHIVES: 1
6161
run: just ci-test
6262

6363
test-fast:
@@ -69,7 +69,7 @@ jobs:
6969
- ubuntu-latest
7070
runs-on: ${{ matrix.os }}
7171
steps:
72-
- uses: actions/checkout@v3
72+
- uses: actions/checkout@v4
7373
- uses: dtolnay/rust-toolchain@stable
7474
- uses: Swatinem/rust-cache@v2
7575
- name: Setup dependencies (macos)
@@ -79,10 +79,7 @@ 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
85-
- uses: taiki-e/install-action@v1
82+
- uses: taiki-e/install-action@v2
8683
with:
8784
tool: nextest
8885
- name: "Test (nextest)"
@@ -94,15 +91,15 @@ jobs:
9491
matrix:
9592
target: [ armv7-linux-androideabi ]
9693
steps:
97-
- uses: actions/checkout@v3
94+
- uses: actions/checkout@v4
9895
- uses: dtolnay/rust-toolchain@stable
9996
- uses: Swatinem/rust-cache@v2
10097
- name: Install Rust
10198
uses: dtolnay/rust-toolchain@master
10299
with:
103100
toolchain: stable
104101
targets: ${{ matrix.target }}
105-
- uses: taiki-e/install-action@v1
102+
- uses: taiki-e/install-action@v2
106103
with:
107104
tool: cross
108105
- name: "check"
@@ -135,7 +132,7 @@ jobs:
135132
target: i686-pc-windows-gnu
136133
runs-on: ${{ matrix.os }}
137134
steps:
138-
- uses: actions/checkout@v3
135+
- uses: actions/checkout@v4
139136
- name: Install Rust
140137
uses: dtolnay/rust-toolchain@master
141138
with:
@@ -150,18 +147,18 @@ jobs:
150147
- name: "Install prerequisites"
151148
run: vcpkg install zlib:x64-windows-static-md
152149
- name: "Installation from crates.io: gitoxide"
153-
run: cargo +${{ matrix.rust }} install --target ${{ matrix.target }} --target-dir install-artifacts --debug --force gitoxide
150+
run: cargo +${{ matrix.rust }} install --target ${{ matrix.target }} --no-default-features --features max-pure --target-dir install-artifacts --debug --force gitoxide
154151
shell: msys2 {0}
155152

156153
lint:
157154
runs-on: ubuntu-latest
158155
steps:
159-
- uses: actions/checkout@v3
156+
- uses: actions/checkout@v4
160157
- uses: dtolnay/rust-toolchain@master
161158
with:
162159
toolchain: stable
163160
components: clippy,rustfmt
164-
- uses: extractions/setup-just@v1
161+
- uses: extractions/setup-just@v2
165162
- name: Run cargo clippy
166163
run: just clippy -D warnings -A unknown-lints
167164
- name: Run cargo doc
@@ -189,7 +186,7 @@ jobs:
189186
continue-on-error: ${{ matrix.checks == 'advisories' }}
190187

191188
steps:
192-
- uses: actions/checkout@v3
189+
- uses: actions/checkout@v4
193190
- uses: EmbarkStudios/cargo-deny-action@v1
194191
with:
195192
command: check ${{ matrix.checks }}

.github/workflows/cifuzz.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
language: rust
1818
fuzz-seconds: 600
1919
- name: Upload Crash
20-
uses: actions/upload-artifact@v3
20+
uses: actions/upload-artifact@v4
2121
if: failure() && steps.build.outcome == 'success'
2222
with:
2323
name: artifacts

.github/workflows/cron.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
stress:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1313
- uses: Swatinem/rust-cache@v2
1414
- name: stress
1515
run: make stress

.github/workflows/msrv.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@ jobs:
1818
- windows-2019
1919
- ubuntu-latest
2020
runs-on: ${{ matrix.os }}
21+
env:
22+
# dictated by `firefox` to support the `helix` editor, but now driven by the `time` crate. IMPORTANT: adjust etc/msrv-badge.svg as well
23+
rust_version: 1.67.0
2124
steps:
22-
- uses: actions/checkout@v3
23-
- uses: dtolnay/[email protected] # dictated by `firefox` to support the `helix` editor, but now driven by the `time` crate. IMPORTANT: adjust etc/msrv-badge.svg as well
24-
- uses: extractions/setup-just@v1
25+
- uses: actions/checkout@v4
26+
- uses: extractions/setup-just@v2
27+
- run: |
28+
rustup toolchain install ${{ env.rust_version }} --profile minimal --no-self-update
29+
rustup default ${{ env.rust_version }}
2530
- run: just ci-check-msrv

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
run: echo "${{ env.ARTIFACT_VERSION }}" > artifacts/release-version
6161

6262
- name: Upload artifacts
63-
uses: actions/upload-artifact@v3
63+
uses: actions/upload-artifact@v4
6464
with:
6565
name: artifacts
6666
path: artifacts
@@ -129,7 +129,7 @@ jobs:
129129
runs-on: ${{ matrix.os }}
130130
steps:
131131
- name: Checkout repository
132-
uses: actions/checkout@v3
132+
uses: actions/checkout@v4
133133
with:
134134
fetch-depth: 1
135135

@@ -161,7 +161,7 @@ jobs:
161161
echo "target dir is: ${{ env.TARGET_DIR }}"
162162
163163
- name: Get release download URL
164-
uses: actions/download-artifact@v3
164+
uses: actions/download-artifact@v4
165165
with:
166166
name: artifacts
167167
path: artifacts
@@ -211,7 +211,7 @@ jobs:
211211
fi
212212
213213
- name: Upload release archive
214-
uses: actions/[email protected].1
214+
uses: actions/[email protected].2
215215
env:
216216
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
217217
with:

CHANGELOG.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,67 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 0.36.0 (2024-05-22)
9+
10+
### New Features
11+
12+
- <csr-id-886d6b58e4612ac21cc660ea4ddf1dd0b49d1c6e/> checkout respects options for `core.protectHFS` and `core.protectNTFS`.
13+
This also adds `gitoxide.core.protectWindows` as a way to enforce
14+
additional restrictions that are usually only available on Windows.
15+
16+
Note that `core.protectNFS` is always enabled by default, just like
17+
[it is in Git](https://github.com/git/git/commit/9102f958ee5254b10c0be72672aa3305bf4f4704).
18+
19+
### Bug Fixes
20+
21+
- <csr-id-addf446f052ff74edcdb083f2b2968b313daa940/> more robustness in the face of a trampling-herd of threads loading a single index.
22+
The motivating example is here: https://github.com/praetorian-inc/noseyparker/issues/179
23+
24+
Previously, it was possible for a trampling herd of threads to consolidate the
25+
disk state. Most of them would be 'needs-init' threads which could notice that
26+
the initialization already happened, and just use that.
27+
28+
But a thread might be late for the party and somehow manages to not get any
29+
newly loaded index, and thus tries to consolidate with what's on disk again.
30+
Then it would again determine no change, and return nothing, causing the caller
31+
to abort and not find objects it should find because it wouldn't see the index
32+
that it should have seen.
33+
34+
The reason the thread got into this mess is that the 'is-load-ongoing' flagging
35+
was racy itself, so it would not wait for ongoing loads and just conclude nothing
36+
happened. An extra delay (by yielding) now assures it either seees the loading state
37+
and waits for it, sees the newly loaded indices.
38+
39+
Note that this issue can be reproduced with:
40+
41+
```
42+
'./target/release/gix -r repo-with-one-pack -t10 --trace odb stats --extra-header-lookup'
43+
```
44+
45+
### Commit Statistics
46+
47+
<csr-read-only-do-not-edit/>
48+
49+
- 6 commits contributed to the release over the course of 10 calendar days.
50+
- 38 days passed between releases.
51+
- 2 commits were understood as [conventional](https://www.conventionalcommits.org).
52+
- 0 issues like '(#ID)' were seen in commit messages
53+
54+
### Commit Details
55+
56+
<csr-read-only-do-not-edit/>
57+
58+
<details><summary>view details</summary>
59+
60+
* **Uncategorized**
61+
- Merge branch 'various-fixes' ([`d6cd449`](https://github.com/Byron/gitoxide/commit/d6cd44930fb204b06e2b70fc6965e7705530c47a))
62+
- Merge pull request from GHSA-7w47-3wg8-547c ([`79dce79`](https://github.com/Byron/gitoxide/commit/79dce79c62f6072aa2653780d590dc3993dfa401))
63+
- Checkout respects options for `core.protectHFS` and `core.protectNTFS`. ([`886d6b5`](https://github.com/Byron/gitoxide/commit/886d6b58e4612ac21cc660ea4ddf1dd0b49d1c6e))
64+
- Mark safety-related core-flags as planned ([`f3d5a69`](https://github.com/Byron/gitoxide/commit/f3d5a69bbe0ad14502ce617dc580cc2aa481bb0a))
65+
- Merge branch 'status' ([`04ef31e`](https://github.com/Byron/gitoxide/commit/04ef31e9d6f5332d49037a5a4c248ebbb5aaf92b))
66+
- More robustness in the face of a trampling-herd of threads loading a single index. ([`addf446`](https://github.com/Byron/gitoxide/commit/addf446f052ff74edcdb083f2b2968b313daa940))
67+
</details>
68+
869
## 0.35.0 (2024-04-13)
970

1071
### New Features

0 commit comments

Comments
 (0)