Skip to content

Commit 9225cf1

Browse files
committed
Merge branch 'ready-for-upstream'
This is the branch thicket of patches in Git for Windows that are considered ready for upstream. To keep them in a ready-to-submit shape, they are kept as close to the beginning of the branch thicket as possible.
2 parents 212df3c + 60b0f30 commit 9225cf1

113 files changed

Lines changed: 4464 additions & 330 deletions

File tree

Some content is hidden

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

.github/workflows/check-style.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
jobname: ClangFormat
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v5
23+
- uses: actions/checkout@v6
2424
with:
2525
fetch-depth: 0
2626

.github/workflows/check-whitespace.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
check-whitespace:
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v5
22+
- uses: actions/checkout@v6
2323
with:
2424
fetch-depth: 0
2525

.github/workflows/coverity.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ jobs:
3838
COVERITY_LANGUAGE: cxx
3939
COVERITY_PLATFORM: overridden-below
4040
steps:
41-
- uses: actions/checkout@v5
41+
- uses: actions/checkout@v6
4242
- name: install minimal Git for Windows SDK
4343
if: contains(matrix.os, 'windows')
44-
uses: git-for-windows/setup-git-for-windows-sdk@v1
44+
uses: git-for-windows/setup-git-for-windows-sdk@v2
4545
- run: ci/install-dependencies.sh
4646
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
4747
env:

.github/workflows/l10n.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
cat git-po-helper.out
9393
exit $exit_code
9494
- name: Create comment in pull request for report
95-
uses: mshick/add-pr-comment@v2
95+
uses: mshick/add-pr-comment@v3
9696
if: >-
9797
always() &&
9898
github.event_name == 'pull_request_target' &&

.github/workflows/main.yml

Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
echo "skip_concurrent=$skip_concurrent" >>$GITHUB_OUTPUT
6464
- name: skip if the commit or tree was already tested
6565
id: skip-if-redundant
66-
uses: actions/github-script@v8
66+
uses: actions/github-script@v9
6767
if: steps.check-ref.outputs.enabled == 'yes'
6868
with:
6969
github-token: ${{secrets.GITHUB_TOKEN}}
@@ -112,8 +112,8 @@ jobs:
112112
group: windows-build-${{ github.ref }}
113113
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
114114
steps:
115-
- uses: actions/checkout@v5
116-
- uses: git-for-windows/setup-git-for-windows-sdk@v1
115+
- uses: actions/checkout@v6
116+
- uses: git-for-windows/setup-git-for-windows-sdk@v2
117117
- name: build
118118
shell: bash
119119
env:
@@ -123,7 +123,7 @@ jobs:
123123
- name: zip up tracked files
124124
run: git archive -o artifacts/tracked.tar.gz HEAD
125125
- name: upload tracked files and build artifacts
126-
uses: actions/upload-artifact@v5
126+
uses: actions/upload-artifact@v7
127127
with:
128128
name: windows-artifacts
129129
path: artifacts
@@ -140,14 +140,14 @@ jobs:
140140
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
141141
steps:
142142
- name: download tracked files and build artifacts
143-
uses: actions/download-artifact@v6
143+
uses: actions/download-artifact@v8
144144
with:
145145
name: windows-artifacts
146146
path: ${{github.workspace}}
147147
- name: extract tracked files and build artifacts
148148
shell: bash
149149
run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz
150-
- uses: git-for-windows/setup-git-for-windows-sdk@v1
150+
- uses: git-for-windows/setup-git-for-windows-sdk@v2
151151
- name: test
152152
shell: bash
153153
run: . /etc/profile && ci/run-test-slice.sh $((${{matrix.nr}} + 1)) 10
@@ -157,7 +157,7 @@ jobs:
157157
run: ci/print-test-failures.sh
158158
- name: Upload failed tests' directories
159159
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
160-
uses: actions/upload-artifact@v5
160+
uses: actions/upload-artifact@v7
161161
with:
162162
name: failed-tests-windows-${{ matrix.nr }}
163163
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -169,14 +169,17 @@ jobs:
169169
NO_PERL: 1
170170
GIT_CONFIG_PARAMETERS: "'user.name=CI' 'user.email=ci@git'"
171171
runs-on: windows-latest
172+
strategy:
173+
matrix:
174+
arch: [x64, arm64]
172175
concurrency:
173-
group: vs-build-${{ github.ref }}
176+
group: vs-build-${{ github.ref }}-${{ matrix.arch }}
174177
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
175178
steps:
176-
- uses: actions/checkout@v5
177-
- uses: git-for-windows/setup-git-for-windows-sdk@v1
179+
- uses: actions/checkout@v6
180+
- uses: git-for-windows/setup-git-for-windows-sdk@v2
178181
- name: initialize vcpkg
179-
uses: actions/checkout@v5
182+
uses: actions/checkout@v6
180183
with:
181184
repository: 'microsoft/vcpkg'
182185
path: 'compat/vcbuild/vcpkg'
@@ -186,17 +189,19 @@ jobs:
186189
repository: git/git
187190
definitionId: 9
188191
- name: add msbuild to PATH
189-
uses: microsoft/setup-msbuild@v2
192+
uses: microsoft/setup-msbuild@v3
190193
- name: copy dlls to root
191194
shell: cmd
192-
run: compat\vcbuild\vcpkg_copy_dlls.bat release
195+
run: compat\vcbuild\vcpkg_copy_dlls.bat release ${{ matrix.arch }}-windows
193196
- name: generate Visual Studio solution
194197
shell: bash
195198
run: |
196-
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \
197-
-DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON
199+
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/${{ matrix.arch }}-windows \
200+
-DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=${{ matrix.arch }} -DVCPKG_ARCH=${{ matrix.arch }}-windows -DHOST_CPU=${{ matrix.arch }}
198201
- name: MSBuild
199-
run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142
202+
run: |
203+
$sln = if (Test-Path git.slnx) { 'git.slnx' } else { 'git.sln' }
204+
msbuild $sln -property:Configuration=Release -property:Platform=${{ matrix.arch }} -maxCpuCount:4
200205
- name: bundle artifact tar
201206
shell: bash
202207
env:
@@ -208,9 +213,9 @@ jobs:
208213
- name: zip up tracked files
209214
run: git archive -o artifacts/tracked.tar.gz HEAD
210215
- name: upload tracked files and build artifacts
211-
uses: actions/upload-artifact@v5
216+
uses: actions/upload-artifact@v7
212217
with:
213-
name: vs-artifacts
218+
name: vs-artifacts-${{ matrix.arch }}
214219
path: artifacts
215220
vs-test:
216221
name: win+VS test
@@ -224,11 +229,11 @@ jobs:
224229
group: vs-test-${{ matrix.nr }}-${{ github.ref }}
225230
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
226231
steps:
227-
- uses: git-for-windows/setup-git-for-windows-sdk@v1
232+
- uses: git-for-windows/setup-git-for-windows-sdk@v2
228233
- name: download tracked files and build artifacts
229-
uses: actions/download-artifact@v6
234+
uses: actions/download-artifact@v8
230235
with:
231-
name: vs-artifacts
236+
name: vs-artifacts-x64
232237
path: ${{github.workspace}}
233238
- name: extract tracked files and build artifacts
234239
shell: bash
@@ -244,7 +249,7 @@ jobs:
244249
run: ci/print-test-failures.sh
245250
- name: Upload failed tests' directories
246251
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
247-
uses: actions/upload-artifact@v5
252+
uses: actions/upload-artifact@v7
248253
with:
249254
name: failed-tests-windows-vs-${{ matrix.nr }}
250255
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -258,7 +263,7 @@ jobs:
258263
group: windows-meson-build-${{ github.ref }}
259264
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
260265
steps:
261-
- uses: actions/checkout@v5
266+
- uses: actions/checkout@v6
262267
- uses: actions/setup-python@v6
263268
- name: Set up dependencies
264269
shell: pwsh
@@ -270,7 +275,7 @@ jobs:
270275
shell: pwsh
271276
run: meson compile -C build
272277
- name: Upload build artifacts
273-
uses: actions/upload-artifact@v5
278+
uses: actions/upload-artifact@v7
274279
with:
275280
name: windows-meson-artifacts
276281
path: build
@@ -286,13 +291,13 @@ jobs:
286291
group: windows-meson-test-${{ matrix.nr }}-${{ github.ref }}
287292
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
288293
steps:
289-
- uses: actions/checkout@v5
294+
- uses: actions/checkout@v6
290295
- uses: actions/setup-python@v6
291296
- name: Set up dependencies
292297
shell: pwsh
293298
run: pip install meson ninja
294299
- name: Download build artifacts
295-
uses: actions/download-artifact@v6
300+
uses: actions/download-artifact@v8
296301
with:
297302
name: windows-meson-artifacts
298303
path: build
@@ -305,7 +310,7 @@ jobs:
305310
run: ci/print-test-failures.sh
306311
- name: Upload failed tests' directories
307312
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
308-
uses: actions/upload-artifact@v4
313+
uses: actions/upload-artifact@v7
309314
with:
310315
name: failed-tests-windows-meson-${{ matrix.nr }}
311316
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -341,15 +346,15 @@ jobs:
341346
TEST_OUTPUT_DIRECTORY: ${{github.workspace}}/t
342347
runs-on: ${{matrix.vector.pool}}
343348
steps:
344-
- uses: actions/checkout@v5
349+
- uses: actions/checkout@v6
345350
- run: ci/install-dependencies.sh
346351
- run: ci/run-build-and-tests.sh
347352
- name: print test failures
348353
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
349354
run: ci/print-test-failures.sh
350355
- name: Upload failed tests' directories
351356
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
352-
uses: actions/upload-artifact@v5
357+
uses: actions/upload-artifact@v7
353358
with:
354359
name: failed-tests-${{matrix.vector.jobname}}
355360
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -362,7 +367,7 @@ jobs:
362367
CI_JOB_IMAGE: ubuntu-latest
363368
runs-on: ubuntu-latest
364369
steps:
365-
- uses: actions/checkout@v5
370+
- uses: actions/checkout@v6
366371
- run: ci/install-dependencies.sh
367372
- run: ci/run-build-and-minimal-fuzzers.sh
368373
dockerized:
@@ -441,7 +446,7 @@ jobs:
441446
else
442447
apt-get -q update && apt-get -q -y install git
443448
fi
444-
- uses: actions/checkout@v5
449+
- uses: actions/checkout@v6
445450
- run: ci/install-dependencies.sh
446451
- run: useradd builder --create-home
447452
- run: chown -R builder .
@@ -451,7 +456,7 @@ jobs:
451456
run: sudo --preserve-env --set-home --user=builder ci/print-test-failures.sh
452457
- name: Upload failed tests' directories
453458
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
454-
uses: actions/upload-artifact@v5
459+
uses: actions/upload-artifact@v7
455460
with:
456461
name: failed-tests-${{matrix.vector.jobname}}
457462
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -466,7 +471,7 @@ jobs:
466471
group: static-analysis-${{ github.ref }}
467472
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
468473
steps:
469-
- uses: actions/checkout@v5
474+
- uses: actions/checkout@v6
470475
- run: ci/install-dependencies.sh
471476
- run: ci/run-static-analysis.sh
472477
- run: ci/check-directional-formatting.bash
@@ -482,7 +487,7 @@ jobs:
482487
group: rust-analysis-${{ github.ref }}
483488
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
484489
steps:
485-
- uses: actions/checkout@v5
490+
- uses: actions/checkout@v6
486491
- run: ci/install-dependencies.sh
487492
- run: ci/run-rust-checks.sh
488493
sparse:
@@ -496,7 +501,7 @@ jobs:
496501
group: sparse-${{ github.ref }}
497502
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
498503
steps:
499-
- uses: actions/checkout@v5
504+
- uses: actions/checkout@v6
500505
- name: Install other dependencies
501506
run: ci/install-dependencies.sh
502507
- run: make sparse
@@ -512,6 +517,6 @@ jobs:
512517
CI_JOB_IMAGE: ubuntu-latest
513518
runs-on: ubuntu-latest
514519
steps:
515-
- uses: actions/checkout@v5
520+
- uses: actions/checkout@v6
516521
- run: ci/install-dependencies.sh
517522
- run: ci/test-documentation.sh

.github/workflows/nano-server.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Windows Nano Server tests
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
DEVELOPER: 1
8+
9+
jobs:
10+
test-nano-server:
11+
runs-on: windows-2022
12+
env:
13+
WINDBG_DIR: "C:/Program Files (x86)/Windows Kits/10/Debuggers/x64"
14+
IMAGE: mcr.microsoft.com/powershell:nanoserver-ltsc2022
15+
16+
steps:
17+
- uses: actions/checkout@v6
18+
- uses: git-for-windows/setup-git-for-windows-sdk@v2
19+
- name: build Git
20+
shell: bash
21+
run: make -j15
22+
- name: pull nanoserver image
23+
shell: bash
24+
run: docker pull $IMAGE
25+
- name: run nano-server test
26+
shell: bash
27+
run: |
28+
docker run \
29+
--user "ContainerAdministrator" \
30+
-v "$WINDBG_DIR:C:/dbg" \
31+
-v "$(cygpath -aw /mingw64/bin):C:/mingw64-bin" \
32+
-v "$(cygpath -aw .):C:/test" \
33+
$IMAGE pwsh.exe -Command '
34+
# Extend the PATH to include the `.dll` files in /mingw64/bin/
35+
$env:PATH += ";C:\mingw64-bin"
36+
37+
# For each executable to test pick some no-operation set of
38+
# flags/subcommands or something that should quickly result in an
39+
# error with known exit code that is not a negative 32-bit
40+
# number, and set the expected return code appropriately.
41+
#
42+
# Only test executables that could be expected to run in a UI
43+
# less environment.
44+
#
45+
# ( Executable path, arguments, expected return code )
46+
# also note space is required before close parenthesis (a
47+
# powershell quirk when defining nested arrays like this)
48+
49+
$executables_to_test = @(
50+
("C:\test\git.exe", "", 1 ),
51+
("C:\test\scalar.exe", "version", 0 )
52+
)
53+
54+
foreach ($executable in $executables_to_test)
55+
{
56+
Write-Output "Now testing $($executable[0])"
57+
&$executable[0] $executable[1]
58+
if ($LASTEXITCODE -ne $executable[2]) {
59+
# if we failed, run the debugger to find out what function
60+
# or DLL could not be found and then exit the script with
61+
# failure The missing DLL or EXE will be referenced near
62+
# the end of the output
63+
64+
# Set a flag to have the debugger show loader stub
65+
# diagnostics. This requires running as administrator,
66+
# otherwise the flag will be ignored.
67+
C:\dbg\gflags -i $executable[0] +SLS
68+
69+
C:\dbg\cdb.exe -c "g" -c "q" $executable[0] $executable[1]
70+
71+
exit 1
72+
}
73+
}
74+
75+
exit 0
76+
'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@
171171
/git-submodule
172172
/git-submodule--helper
173173
/git-subtree
174+
/git-survey
174175
/git-svn
175176
/git-switch
176177
/git-symbolic-ref
@@ -257,5 +258,6 @@ Release/
257258
/git.VC.db
258259
*.dSYM
259260
/contrib/buildsystems/out
261+
CMakeSettings.json
260262
/contrib/libgit-rs/target
261263
/contrib/libgit-sys/target

0 commit comments

Comments
 (0)