Skip to content

Commit a11a8ac

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 40598f8 + e4a1041 commit a11a8ac

Some content is hidden

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

96 files changed

+15189
-240
lines changed

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
# especially
6+
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot#enabling-dependabot-version-updates-for-actions
7+
8+
version: 2
9+
updates:
10+
- package-ecosystem: "github-actions" # See documentation for possible values
11+
directory: "/" # Location of package manifests
12+
schedule:
13+
interval: "weekly"

.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@v3
22+
- uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0
2525

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CLANG build ARM64
2+
3+
on:
4+
workflow_dispatch:
5+
6+
defaults:
7+
run:
8+
shell: bash
9+
10+
jobs:
11+
clang-build:
12+
runs-on: [Windows, ARM64]
13+
env:
14+
NO_PERL: 1
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: git-for-windows/setup-git-for-windows-sdk@v1
18+
with:
19+
flavor: makepkg-git
20+
architecture: aarch64
21+
# This assumes that the job is running on a self-hosted runner,
22+
# in which case we need to cleanup SDK files.
23+
cleanup: true
24+
- name: Build Git CLANGARM64
25+
run: make -j`nproc`

.github/workflows/coverity.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
COVERITY_LANGUAGE: cxx
3939
COVERITY_PLATFORM: overridden-below
4040
steps:
41-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v4
4242
- name: install minimal Git for Windows SDK
4343
if: contains(matrix.os, 'windows')
4444
uses: git-for-windows/setup-git-for-windows-sdk@v1
@@ -98,7 +98,7 @@ jobs:
9898
# A cache miss will add ~30s to create, but a cache hit will save minutes.
9999
- name: restore the Coverity Build Tool
100100
id: cache
101-
uses: actions/cache/restore@v3
101+
uses: actions/cache/restore@v4
102102
with:
103103
path: ${{ runner.temp }}/cov-analysis
104104
key: cov-build-${{ env.COVERITY_LANGUAGE }}-${{ env.COVERITY_PLATFORM }}-${{ steps.lookup.outputs.hash }}
@@ -141,7 +141,7 @@ jobs:
141141
esac
142142
- name: cache the Coverity Build Tool
143143
if: steps.cache.outputs.cache-hit != 'true'
144-
uses: actions/cache/save@v3
144+
uses: actions/cache/save@v4
145145
with:
146146
path: ${{ runner.temp }}/cov-analysis
147147
key: cov-build-${{ env.COVERITY_LANGUAGE }}-${{ env.COVERITY_PLATFORM }}-${{ steps.lookup.outputs.hash }}

.github/workflows/l10n.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
origin \
6464
${{ github.ref }} \
6565
$args
66-
- uses: actions/setup-go@v2
66+
- uses: actions/setup-go@v5
6767
with:
6868
go-version: '>=1.16'
6969
- name: Install git-po-helper
@@ -91,7 +91,7 @@ jobs:
9191
cat git-po-helper.out
9292
exit $exit_code
9393
- name: Create comment in pull request for report
94-
uses: mshick/add-pr-comment@v1
94+
uses: mshick/add-pr-comment@v2
9595
if: >-
9696
always() &&
9797
github.event_name == 'pull_request_target' &&

.github/workflows/main.yml

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
group: windows-build-${{ github.ref }}
113113
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
114114
steps:
115-
- uses: actions/checkout@v3
115+
- uses: actions/checkout@v4
116116
- uses: git-for-windows/setup-git-for-windows-sdk@v1
117117
- name: build
118118
shell: bash
@@ -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@v3
126+
uses: actions/upload-artifact@v4
127127
with:
128128
name: windows-artifacts
129129
path: artifacts
@@ -140,7 +140,7 @@ 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@v3
143+
uses: actions/download-artifact@v4
144144
with:
145145
name: windows-artifacts
146146
path: ${{github.workspace}}
@@ -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@v3
160+
uses: actions/upload-artifact@v4
161161
with:
162162
name: failed-tests-windows
163163
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -169,38 +169,37 @@ 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@v3
179+
- uses: actions/checkout@v4
177180
- uses: git-for-windows/setup-git-for-windows-sdk@v1
178181
- name: initialize vcpkg
179-
uses: actions/checkout@v3
182+
uses: actions/checkout@v4
180183
with:
181184
repository: 'microsoft/vcpkg'
182185
path: 'compat/vcbuild/vcpkg'
183186
- name: download vcpkg artifacts
184-
shell: powershell
185-
run: |
186-
$urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
187-
$id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=9&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
188-
$downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[0].resource.downloadUrl
189-
(New-Object Net.WebClient).DownloadFile($downloadUrl, "compat.zip")
190-
Expand-Archive compat.zip -DestinationPath . -Force
191-
Remove-Item compat.zip
187+
uses: git-for-windows/get-azure-pipelines-artifact@v0
188+
with:
189+
repository: git/git
190+
definitionId: 9
192191
- name: add msbuild to PATH
193192
uses: microsoft/setup-msbuild@v1
194193
- name: copy dlls to root
195194
shell: cmd
196-
run: compat\vcbuild\vcpkg_copy_dlls.bat release
195+
run: compat\vcbuild\vcpkg_copy_dlls.bat release ${{ matrix.arch }}-windows
197196
- name: generate Visual Studio solution
198197
shell: bash
199198
run: |
200-
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \
201-
-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 }}
202201
- name: MSBuild
203-
run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142
202+
run: msbuild git.sln -property:Configuration=Release -property:Platform=${{ matrix.arch }} -maxCpuCount:4 -property:PlatformToolset=v142
204203
- name: bundle artifact tar
205204
shell: bash
206205
env:
@@ -212,9 +211,9 @@ jobs:
212211
- name: zip up tracked files
213212
run: git archive -o artifacts/tracked.tar.gz HEAD
214213
- name: upload tracked files and build artifacts
215-
uses: actions/upload-artifact@v3
214+
uses: actions/upload-artifact@v4
216215
with:
217-
name: vs-artifacts
216+
name: vs-artifacts-${{ matrix.arch }}
218217
path: artifacts
219218
vs-test:
220219
name: win+VS test
@@ -230,9 +229,9 @@ jobs:
230229
steps:
231230
- uses: git-for-windows/setup-git-for-windows-sdk@v1
232231
- name: download tracked files and build artifacts
233-
uses: actions/download-artifact@v3
232+
uses: actions/download-artifact@v4
234233
with:
235-
name: vs-artifacts
234+
name: vs-artifacts-x64
236235
path: ${{github.workspace}}
237236
- name: extract tracked files and build artifacts
238237
shell: bash
@@ -248,7 +247,7 @@ jobs:
248247
run: ci/print-test-failures.sh
249248
- name: Upload failed tests' directories
250249
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
251-
uses: actions/upload-artifact@v3
250+
uses: actions/upload-artifact@v4
252251
with:
253252
name: failed-tests-windows
254253
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -297,15 +296,15 @@ jobs:
297296
runs_on_pool: ${{matrix.vector.pool}}
298297
runs-on: ${{matrix.vector.pool}}
299298
steps:
300-
- uses: actions/checkout@v3
299+
- uses: actions/checkout@v4
301300
- run: ci/install-dependencies.sh
302301
- run: ci/run-build-and-tests.sh
303302
- name: print test failures
304303
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
305304
run: ci/print-test-failures.sh
306305
- name: Upload failed tests' directories
307306
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
308-
uses: actions/upload-artifact@v3
307+
uses: actions/upload-artifact@v4
309308
with:
310309
name: failed-tests-${{matrix.vector.jobname}}
311310
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -342,7 +341,7 @@ jobs:
342341
runs-on: ubuntu-latest
343342
container: ${{matrix.vector.image}}
344343
steps:
345-
- uses: actions/checkout@v3
344+
- uses: actions/checkout@v4
346345
if: matrix.vector.jobname != 'linux32'
347346
- uses: actions/checkout@v1
348347
if: matrix.vector.jobname == 'linux32'
@@ -353,13 +352,13 @@ jobs:
353352
run: ci/print-test-failures.sh
354353
- name: Upload failed tests' directories
355354
if: failure() && env.FAILED_TEST_ARTIFACTS != '' && matrix.vector.jobname != 'linux32'
356-
uses: actions/upload-artifact@v3
355+
uses: actions/upload-artifact@v4
357356
with:
358357
name: failed-tests-${{matrix.vector.jobname}}
359358
path: ${{env.FAILED_TEST_ARTIFACTS}}
360359
- name: Upload failed tests' directories
361360
if: failure() && env.FAILED_TEST_ARTIFACTS != '' && matrix.vector.jobname == 'linux32'
362-
uses: actions/upload-artifact@v1
361+
uses: actions/upload-artifact@v4
363362
with:
364363
name: failed-tests-${{matrix.vector.jobname}}
365364
path: ${{env.FAILED_TEST_ARTIFACTS}}
@@ -373,7 +372,7 @@ jobs:
373372
group: static-analysis-${{ github.ref }}
374373
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
375374
steps:
376-
- uses: actions/checkout@v3
375+
- uses: actions/checkout@v4
377376
- run: ci/install-dependencies.sh
378377
- run: ci/run-static-analysis.sh
379378
- run: ci/check-directional-formatting.bash
@@ -396,7 +395,7 @@ jobs:
396395
artifact: sparse-20.04
397396
- name: Install the current `sparse` package
398397
run: sudo dpkg -i sparse-20.04/sparse_*.deb
399-
- uses: actions/checkout@v3
398+
- uses: actions/checkout@v4
400399
- name: Install other dependencies
401400
run: ci/install-dependencies.sh
402401
- run: make sparse
@@ -411,6 +410,6 @@ jobs:
411410
jobname: Documentation
412411
runs-on: ubuntu-latest
413412
steps:
414-
- uses: actions/checkout@v3
413+
- uses: actions/checkout@v4
415414
- run: ci/install-dependencies.sh
416415
- 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@v4
18+
- uses: git-for-windows/setup-git-for-windows-sdk@v1
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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,3 +247,4 @@ Release/
247247
/git.VC.db
248248
*.dSYM
249249
/contrib/buildsystems/out
250+
CMakeSettings.json

Documentation/config.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,8 @@ include::config/safe.txt[]
509509

510510
include::config/sendemail.txt[]
511511

512+
include::config/sendpack.txt[]
513+
512514
include::config/sequencer.txt[]
513515

514516
include::config/showbranch.txt[]
@@ -545,4 +547,6 @@ include::config/versionsort.txt[]
545547

546548
include::config/web.txt[]
547549

550+
include::config/windows.txt[]
551+
548552
include::config/worktree.txt[]

0 commit comments

Comments
 (0)