Skip to content

Commit 02e3ae6

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 366e52a + 7ef3ca3 commit 02e3ae6

File tree

118 files changed

+19946
-240
lines changed

Some content is hidden

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

118 files changed

+19946
-240
lines changed

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

.github/workflows/coverity.yml

Lines changed: 1 addition & 1 deletion
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@v4
41+
- uses: actions/checkout@v5
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

.github/workflows/main.yml

Lines changed: 27 additions & 24 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@v7
66+
uses: actions/github-script@v8
6767
if: steps.check-ref.outputs.enabled == 'yes'
6868
with:
6969
github-token: ${{secrets.GITHUB_TOKEN}}
@@ -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@v4
115+
- uses: actions/checkout@v5
116116
- uses: git-for-windows/setup-git-for-windows-sdk@v1
117117
- name: build
118118
shell: bash
@@ -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@v4
143+
uses: actions/download-artifact@v5
144144
with:
145145
name: windows-artifacts
146146
path: ${{github.workspace}}
@@ -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@v4
179+
- uses: actions/checkout@v5
177180
- uses: git-for-windows/setup-git-for-windows-sdk@v1
178181
- name: initialize vcpkg
179-
uses: actions/checkout@v4
182+
uses: actions/checkout@v5
180183
with:
181184
repository: 'microsoft/vcpkg'
182185
path: 'compat/vcbuild/vcpkg'
@@ -189,14 +192,14 @@ jobs:
189192
uses: microsoft/setup-msbuild@v2
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: msbuild git.sln -property:Configuration=Release -property:Platform=${{ matrix.arch }} -maxCpuCount:4 -property:PlatformToolset=v142
200203
- name: bundle artifact tar
201204
shell: bash
202205
env:
@@ -210,7 +213,7 @@ jobs:
210213
- name: upload tracked files and build artifacts
211214
uses: actions/upload-artifact@v4
212215
with:
213-
name: vs-artifacts
216+
name: vs-artifacts-${{ matrix.arch }}
214217
path: artifacts
215218
vs-test:
216219
name: win+VS test
@@ -226,9 +229,9 @@ jobs:
226229
steps:
227230
- uses: git-for-windows/setup-git-for-windows-sdk@v1
228231
- name: download tracked files and build artifacts
229-
uses: actions/download-artifact@v4
232+
uses: actions/download-artifact@v5
230233
with:
231-
name: vs-artifacts
234+
name: vs-artifacts-x64
232235
path: ${{github.workspace}}
233236
- name: extract tracked files and build artifacts
234237
shell: bash
@@ -258,8 +261,8 @@ jobs:
258261
group: windows-meson-build-${{ github.ref }}
259262
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
260263
steps:
261-
- uses: actions/checkout@v4
262-
- uses: actions/setup-python@v5
264+
- uses: actions/checkout@v5
265+
- uses: actions/setup-python@v6
263266
- name: Set up dependencies
264267
shell: pwsh
265268
run: pip install meson ninja
@@ -286,13 +289,13 @@ jobs:
286289
group: windows-meson-test-${{ matrix.nr }}-${{ github.ref }}
287290
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
288291
steps:
289-
- uses: actions/checkout@v4
290-
- uses: actions/setup-python@v5
292+
- uses: actions/checkout@v5
293+
- uses: actions/setup-python@v6
291294
- name: Set up dependencies
292295
shell: pwsh
293296
run: pip install meson ninja
294297
- name: Download build artifacts
295-
uses: actions/download-artifact@v4
298+
uses: actions/download-artifact@v5
296299
with:
297300
name: windows-meson-artifacts
298301
path: build
@@ -331,7 +334,7 @@ jobs:
331334
TEST_OUTPUT_DIRECTORY: ${{github.workspace}}/t
332335
runs-on: ${{matrix.vector.pool}}
333336
steps:
334-
- uses: actions/checkout@v4
337+
- uses: actions/checkout@v5
335338
- run: ci/install-dependencies.sh
336339
- run: ci/run-build-and-tests.sh
337340
- name: print test failures
@@ -352,7 +355,7 @@ jobs:
352355
CI_JOB_IMAGE: ubuntu-latest
353356
runs-on: ubuntu-latest
354357
steps:
355-
- uses: actions/checkout@v4
358+
- uses: actions/checkout@v5
356359
- run: ci/install-dependencies.sh
357360
- run: ci/run-build-and-minimal-fuzzers.sh
358361
dockerized:
@@ -429,7 +432,7 @@ jobs:
429432
else
430433
apt-get -q update && apt-get -q -y install git
431434
fi
432-
- uses: actions/checkout@v4
435+
- uses: actions/checkout@v5
433436
- run: ci/install-dependencies.sh
434437
- run: useradd builder --create-home
435438
- run: chown -R builder .
@@ -454,7 +457,7 @@ jobs:
454457
group: static-analysis-${{ github.ref }}
455458
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
456459
steps:
457-
- uses: actions/checkout@v4
460+
- uses: actions/checkout@v5
458461
- run: ci/install-dependencies.sh
459462
- run: ci/run-static-analysis.sh
460463
- run: ci/check-directional-formatting.bash
@@ -469,7 +472,7 @@ jobs:
469472
group: sparse-${{ github.ref }}
470473
cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
471474
steps:
472-
- uses: actions/checkout@v4
475+
- uses: actions/checkout@v5
473476
- name: Install other dependencies
474477
run: ci/install-dependencies.sh
475478
- run: make sparse
@@ -485,6 +488,6 @@ jobs:
485488
CI_JOB_IMAGE: ubuntu-latest
486489
runs-on: ubuntu-latest
487490
steps:
488-
- uses: actions/checkout@v4
491+
- uses: actions/checkout@v5
489492
- run: ci/install-dependencies.sh
490493
- 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@v5
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@
166166
/git-submodule
167167
/git-submodule--helper
168168
/git-subtree
169+
/git-survey
169170
/git-svn
170171
/git-switch
171172
/git-symbolic-ref
@@ -252,5 +253,6 @@ Release/
252253
/git.VC.db
253254
*.dSYM
254255
/contrib/buildsystems/out
256+
CMakeSettings.json
255257
/contrib/libgit-rs/target
256258
/contrib/libgit-sys/target

Documentation/config.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,8 @@ include::config/safe.adoc[]
517517

518518
include::config/sendemail.adoc[]
519519

520+
include::config/sendpack.adoc[]
521+
520522
include::config/sequencer.adoc[]
521523

522524
include::config/showbranch.adoc[]
@@ -535,6 +537,8 @@ include::config/status.adoc[]
535537

536538
include::config/submodule.adoc[]
537539

540+
include::config/survey.adoc[]
541+
538542
include::config/tag.adoc[]
539543

540544
include::config/tar.adoc[]
@@ -557,4 +561,6 @@ include::config/versionsort.adoc[]
557561

558562
include::config/web.adoc[]
559563

564+
include::config/windows.adoc[]
565+
560566
include::config/worktree.adoc[]

Documentation/config/http.adoc

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,13 @@ http.sslKeyType::
233233

234234
http.schannelCheckRevoke::
235235
Used to enforce or disable certificate revocation checks in cURL
236-
when http.sslBackend is set to "schannel". Defaults to `true` if
237-
unset. Only necessary to disable this if Git consistently errors
238-
and the message is about checking the revocation status of a
239-
certificate. This option is ignored if cURL lacks support for
240-
setting the relevant SSL option at runtime.
236+
when http.sslBackend is set to "schannel" via "true" and "false",
237+
respectively. Another accepted value is "best-effort" (the default)
238+
in which case revocation checks are performed, but errors due to
239+
revocation list distribution points that are offline are silently
240+
ignored, as well as errors due to certificates missing revocation
241+
list distribution points. This option is ignored if cURL lacks
242+
support for setting the relevant SSL option at runtime.
241243

242244
http.schannelUseSSLCAInfo::
243245
As of cURL v7.60.0, the Secure Channel backend can use the
@@ -247,6 +249,11 @@ http.schannelUseSSLCAInfo::
247249
when the `schannel` backend was configured via `http.sslBackend`,
248250
unless `http.schannelUseSSLCAInfo` overrides this behavior.
249251

252+
http.sslAutoClientCert::
253+
As of cURL v7.77.0, the Secure Channel backend won't automatically
254+
send client certificates from the Windows Certificate Store anymore.
255+
To opt in to the old behavior, http.sslAutoClientCert can be set.
256+
250257
http.pinnedPubkey::
251258
Public key of the https service. It may either be the filename of
252259
a PEM or DER encoded public key file or a string starting with

Documentation/config/sendpack.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sendpack.sideband::
2+
Allows to disable the side-band-64k capability for send-pack even
3+
when it is advertised by the server. Makes it possible to work
4+
around a limitation in the git for windows implementation together
5+
with the dump git protocol. Defaults to true.

Documentation/config/survey.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
survey.*::
2+
These variables adjust the default behavior of the `git survey`
3+
command. The intention is that this command could be run in the
4+
background with these options.
5+
+
6+
--
7+
verbose::
8+
This boolean value implies the `--[no-]verbose` option.
9+
progress::
10+
This boolean value implies the `--[no-]progress` option.
11+
top::
12+
This integer value implies `--top=<N>`, specifying the
13+
number of entries in the detail tables.
14+
--

0 commit comments

Comments
 (0)