Skip to content

Commit 1517220

Browse files
authored
Merge pull request #13 from epage/update
chore: Update dependencies
2 parents 8f676bc + f56927e commit 1517220

16 files changed

+373
-291
lines changed

.clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
msrv = "1.54.0" # MSRV
1+
msrv = "1.60.0" # MSRV

.github/workflows/audit.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: Security audit
2+
3+
permissions:
4+
contents: read
5+
26
on:
37
pull_request:
48
paths:
@@ -10,12 +14,18 @@ on:
1014
- '**/Cargo.lock'
1115
schedule:
1216
- cron: '1 1 1 * *'
17+
18+
env:
19+
RUST_BACKTRACE: 1
20+
CARGO_TERM_COLOR: always
21+
CLICOLOR: 1
22+
1323
jobs:
1424
security_audit:
1525
runs-on: ubuntu-latest
1626
steps:
1727
- name: Checkout repository
18-
uses: actions/checkout@v2
28+
uses: actions/checkout@v3
1929
- uses: actions-rs/audit-check@v1
2030
with:
2131
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: CI
2+
3+
permissions:
4+
contents: read
5+
26
on:
37
pull_request:
48
paths:
@@ -9,15 +13,16 @@ on:
913
push:
1014
branches:
1115
- main
12-
paths:
13-
- '**'
14-
- '!/*.md'
15-
- '!/docs/**'
16-
- "!/LICENSE-*"
17-
schedule:
18-
- cron: '1 1 1 * *'
16+
17+
env:
18+
RUST_BACKTRACE: 1
19+
CARGO_TERM_COLOR: always
20+
CLICOLOR: 1
21+
1922
jobs:
2023
ci:
24+
permissions:
25+
contents: none
2126
name: CI
2227
needs: [test, msrv, docs, rustfmt, clippy]
2328
runs-on: ubuntu-latest
@@ -34,7 +39,7 @@ jobs:
3439
runs-on: ${{ matrix.os }}
3540
steps:
3641
- name: Checkout repository
37-
uses: actions/checkout@v2
42+
uses: actions/checkout@v3
3843
- name: Install Rust
3944
uses: actions-rs/toolchain@v1
4045
with:
@@ -55,15 +60,15 @@ jobs:
5560
- name: No-default features
5661
run: cargo test --workspace --no-default-features
5762
msrv:
58-
name: "Check MSRV: 1.54.0"
63+
name: "Check MSRV: 1.60.0"
5964
runs-on: ubuntu-latest
6065
steps:
6166
- name: Checkout repository
62-
uses: actions/checkout@v2
67+
uses: actions/checkout@v3
6368
- name: Install Rust
6469
uses: actions-rs/toolchain@v1
6570
with:
66-
toolchain: 1.54.0 # MSRV
71+
toolchain: 1.60.0 # MSRV
6772
profile: minimal
6873
override: true
6974
- uses: Swatinem/rust-cache@v1
@@ -78,7 +83,7 @@ jobs:
7883
runs-on: ubuntu-latest
7984
steps:
8085
- name: Checkout repository
81-
uses: actions/checkout@v2
86+
uses: actions/checkout@v3
8287
- name: Install Rust
8388
uses: actions-rs/toolchain@v1
8489
with:
@@ -95,7 +100,7 @@ jobs:
95100
runs-on: ubuntu-latest
96101
steps:
97102
- name: Checkout repository
98-
uses: actions/checkout@v2
103+
uses: actions/checkout@v3
99104
- name: Install Rust
100105
uses: actions-rs/toolchain@v1
101106
with:
@@ -113,11 +118,11 @@ jobs:
113118
runs-on: ubuntu-latest
114119
steps:
115120
- name: Checkout repository
116-
uses: actions/checkout@v2
121+
uses: actions/checkout@v3
117122
- name: Install Rust
118123
uses: actions-rs/toolchain@v1
119124
with:
120-
toolchain: 1.54.0 # MSRV
125+
toolchain: 1.60.0 # MSRV
121126
profile: minimal
122127
override: true
123128
components: clippy

.github/workflows/committed.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,21 @@
33
name: Lint Commits
44
on: [pull_request]
55

6+
permissions:
7+
contents: read
8+
9+
env:
10+
RUST_BACKTRACE: 1
11+
CARGO_TERM_COLOR: always
12+
CLICOLOR: 1
13+
614
jobs:
715
committed:
816
name: Lint Commits
917
runs-on: ubuntu-latest
1018
steps:
1119
- name: Checkout Actions Repository
12-
uses: actions/checkout@v2
20+
uses: actions/checkout@v3
1321
with:
1422
fetch-depth: 0
1523
- name: Lint Commits

.github/workflows/pre-commit.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
name: pre-commit
2+
3+
permissions:
4+
contents: read
5+
26
on:
37
pull_request:
48
push:
59
branches: [main]
10+
11+
env:
12+
RUST_BACKTRACE: 1
13+
CARGO_TERM_COLOR: always
14+
CLICOLOR: 1
15+
616
jobs:
717
pre-commit:
818
runs-on: ubuntu-latest
919
steps:
10-
- uses: actions/checkout@v2
11-
- uses: actions/setup-python@v2
12-
- uses: pre-commit/action@v2.0.3
20+
- uses: actions/checkout@v3
21+
- uses: actions/setup-python@v3
22+
- uses: pre-commit/action@v3.0.0

.github/workflows/rust-next.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
name: rust-next
2+
3+
permissions:
4+
contents: read
5+
26
on:
37
schedule:
48
- cron: '1 1 1 * *'
9+
10+
env:
11+
RUST_BACKTRACE: 1
12+
CARGO_TERM_COLOR: always
13+
CLICOLOR: 1
14+
515
jobs:
616
test:
717
name: Test
@@ -16,7 +26,7 @@ jobs:
1626
runs-on: ${{ matrix.os }}
1727
steps:
1828
- name: Checkout repository
19-
uses: actions/checkout@v2
29+
uses: actions/checkout@v3
2030
- name: Install Rust
2131
uses: actions-rs/toolchain@v1
2232
with:
@@ -45,7 +55,7 @@ jobs:
4555
runs-on: ubuntu-latest
4656
steps:
4757
- name: Checkout repository
48-
uses: actions/checkout@v2
58+
uses: actions/checkout@v3
4959
- name: Install Rust
5060
uses: actions-rs/toolchain@v1
5161
with:
@@ -61,13 +71,13 @@ jobs:
6171
strategy:
6272
matrix:
6373
rust:
64-
- 1.54.0 # MSRV
74+
- 1.60.0 # MSRV
6575
- stable
66-
continue-on-error: ${{ matrix.rust != '1.54.0' }} # MSRV
76+
continue-on-error: ${{ matrix.rust != '1.60.0' }} # MSRV
6777
runs-on: ubuntu-latest
6878
steps:
6979
- name: Checkout repository
70-
uses: actions/checkout@v2
80+
uses: actions/checkout@v3
7181
- name: Install Rust
7282
uses: actions-rs/toolchain@v1
7383
with:

.github/workflows/spelling.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
name: Spelling
2+
3+
permissions:
4+
contents: read
5+
26
on: [pull_request]
37

8+
env:
9+
RUST_BACKTRACE: 1
10+
CARGO_TERM_COLOR: always
11+
CLICOLOR: 1
12+
413
jobs:
514
spelling:
615
name: Spell Check with Typos
716
runs-on: ubuntu-latest
817
steps:
918
- name: Checkout Actions Repository
10-
uses: actions/checkout@v2
19+
uses: actions/checkout@v3
1120
- name: Spell Check Repo
1221
uses: crate-ci/typos@master

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ documentation = "http://docs.rs/git2-ext/"
99
readme = "README.md"
1010
categories = ["command-line-interface"]
1111
keywords = ["git"]
12-
edition = "2018"
12+
edition = "2021"
13+
rust-version = "1.60.0" # MSRV
1314
include = [
1415
"build.rs",
1516
"src/**/*",
@@ -36,5 +37,5 @@ itertools = "0.10"
3637
which = "4"
3738

3839
[dev-dependencies]
39-
git-fixture = { version = "0.2" }
40+
git-fixture = { version = "0.3", features = ["yaml"] }
4041
assert_fs = "1"

tests/fixtures/branches.yml

Lines changed: 51 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,61 @@
11
init: true
2-
events:
2+
commands:
33
- tree:
4-
tracked:
4+
files:
55
"file_a.txt": "1"
66
message: "1"
7-
branch: initial
7+
- branch: initial
88
- tree:
9-
tracked:
9+
files:
1010
"file_a.txt": "2"
1111
message: "2"
1212
- tree:
13-
tracked:
13+
files:
1414
"file_a.txt": "3"
1515
message: "3"
16-
branch: base
17-
- children:
18-
- - tree:
19-
tracked:
20-
"file_a.txt": "3"
21-
"file_b.txt": "1"
22-
message: "4"
23-
- tree:
24-
tracked:
25-
"file_a.txt": "3"
26-
"file_b.txt": "2"
27-
message: "5"
28-
branch: master
29-
- tree:
30-
tracked:
31-
"file_a.txt": "3"
32-
"file_b.txt": "3"
33-
message: "6"
34-
branch: off_master
35-
- - tree:
36-
tracked:
37-
"file_a.txt": "3"
38-
"file_c.txt": "1"
39-
message: "7"
40-
branch: feature1
41-
- tree:
42-
tracked:
43-
"file_a.txt": "3"
44-
"file_c.txt": "2"
45-
message: "8"
46-
- tree:
47-
tracked:
48-
"file_a.txt": "3"
49-
"file_c.txt": "3"
50-
message: "9"
51-
- tree:
52-
tracked:
53-
"file_a.txt": "3"
54-
"file_c.txt": "4"
55-
message: "10"
56-
branch: feature2
16+
- branch: base
17+
- label: base
18+
19+
- reset: base
20+
- tree:
21+
files:
22+
"file_a.txt": "3"
23+
"file_b.txt": "1"
24+
message: "4"
25+
- tree:
26+
files:
27+
"file_a.txt": "3"
28+
"file_b.txt": "2"
29+
message: "5"
30+
- branch: master
31+
- tree:
32+
files:
33+
"file_a.txt": "3"
34+
"file_b.txt": "3"
35+
message: "6"
36+
- branch: off_master
37+
38+
- reset: base
39+
- tree:
40+
files:
41+
"file_a.txt": "3"
42+
"file_c.txt": "1"
43+
message: "7"
44+
- branch: feature1
45+
- tree:
46+
files:
47+
"file_a.txt": "3"
48+
"file_c.txt": "2"
49+
message: "8"
50+
- tree:
51+
files:
52+
"file_a.txt": "3"
53+
"file_c.txt": "3"
54+
message: "9"
55+
- tree:
56+
files:
57+
"file_a.txt": "3"
58+
"file_c.txt": "4"
59+
message: "10"
60+
- branch: feature2
61+
- head:

0 commit comments

Comments
 (0)