@@ -49,7 +49,7 @@ isLinear() {
49
49
}
50
50
51
51
step " Fetching nixfmt pull request and creating a branch for the head commit"
52
- git init nixfmt
52
+ git init nixfmt -b unused
53
53
git -C nixfmt fetch " $nixfmtUrl " " refs/pull/$nixfmtPrNumber /merge"
54
54
nixfmtBaseCommit=$( git -C nixfmt rev-parse FETCH_HEAD^1)
55
55
nixfmtHeadCommit=$( git -C nixfmt rev-parse FETCH_HEAD^2)
@@ -97,7 +97,7 @@ bodyForCommitIndex() {
97
97
}
98
98
99
99
step " Fetching upstream Nixpkgs commit history"
100
- git init --bare nixpkgs.git
100
+ git init --bare nixpkgs.git -b unused
101
101
102
102
git -C nixpkgs.git remote add upstream " $nixpkgsUpstreamUrl "
103
103
# This makes sure that we don't actually have to fetch any contents, otherwise we'd wait forever!
@@ -201,16 +201,16 @@ else
201
201
fi
202
202
203
203
204
- git init nixpkgs
204
+ git init nixpkgs -b unused
205
205
git -C nixpkgs config user.name " GitHub Actions"
206
206
git -C nixpkgs config user.email
" [email protected] "
207
207
208
208
step " Fetching contents of Nixpkgs base commit $nixpkgsBaseCommit "
209
209
# This is needed because for every commit we reset Nixpkgs to the base branch before formatting
210
- git -C nixpkgs fetch --no-tags --depth 1 " $nixpkgsUpstreamUrl " " $nixpkgsBaseCommit "
210
+ git -C nixpkgs fetch --no-tags --depth 1 " $nixpkgsUpstreamUrl " " $nixpkgsBaseCommit " :base
211
211
212
212
step " Checking out Nixpkgs at the base commit"
213
- git -C nixpkgs checkout " $nixpkgsBaseCommit "
213
+ git -C nixpkgs checkout base
214
214
215
215
# Because we run the formatter in a Nix derivation, we need to get its input files into the Nix store.
216
216
# Since they never change, it would be wasteful to import them multiple times for each nixfmt run.
@@ -257,7 +257,7 @@ next() {
257
257
update " $index "
258
258
259
259
step " Checking out Nixpkgs at the base commit"
260
- git -C nixpkgs checkout " $nixpkgsBaseCommit " -- .
260
+ git -C nixpkgs checkout base -- .
261
261
262
262
step " Running nixfmt on nixpkgs in a derivation"
263
263
0 commit comments