Skip to content

Commit 762bb89

Browse files
dschoGit for Windows Build Agent
authored andcommitted
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 a1e0bbb + 6174f70 commit 762bb89

File tree

119 files changed

+19791
-296
lines changed

Some content is hidden

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

119 files changed

+19791
-296
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,11 @@ 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:
176179
- uses: actions/checkout@v4
@@ -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
@@ -228,7 +231,7 @@ jobs:
228231
- name: download tracked files and build artifacts
229232
uses: actions/download-artifact@v4
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

.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: 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
@@ -518,6 +518,8 @@ include::config/safe.adoc[]
518518

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

521+
include::config/sendpack.adoc[]
522+
521523
include::config/sequencer.adoc[]
522524

523525
include::config/showbranch.adoc[]
@@ -536,6 +538,8 @@ include::config/status.adoc[]
536538

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

541+
include::config/survey.adoc[]
542+
539543
include::config/tag.adoc[]
540544

541545
include::config/tar.adoc[]
@@ -558,4 +562,6 @@ include::config/versionsort.adoc[]
558562

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

565+
include::config/windows.adoc[]
566+
561567
include::config/worktree.adoc[]

Documentation/config/core.adoc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -696,12 +696,6 @@ core.unsetenvvars::
696696
Defaults to `PERL5LIB` to account for the fact that Git for
697697
Windows insists on using its own Perl interpreter.
698698

699-
core.restrictinheritedhandles::
700-
Windows-only: override whether spawned processes inherit only standard
701-
file handles (`stdin`, `stdout` and `stderr`) or all handles. Can be
702-
`auto`, `true` or `false`. Defaults to `auto`, which means `true` on
703-
Windows 7 and later, and `false` on older Windows versions.
704-
705699
core.createObject::
706700
You can set this to 'link', in which case a hardlink followed by
707701
a delete of the source are used to make sure that object creation

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+
--

Documentation/config/windows.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
windows.appendAtomically::
2+
By default, append atomic API is used on windows. But it works only with
3+
local disk files, if you're working on a network file system, you should
4+
set it false to turn it off.

Documentation/git-survey.adoc

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
git-survey(1)
2+
=============
3+
4+
NAME
5+
----
6+
git-survey - EXPERIMENTAL: Measure various repository dimensions of scale
7+
8+
SYNOPSIS
9+
--------
10+
[verse]
11+
(EXPERIMENTAL!) 'git survey' <options>
12+
13+
DESCRIPTION
14+
-----------
15+
16+
Survey the repository and measure various dimensions of scale.
17+
18+
As repositories grow to "monorepo" size, certain data shapes can cause
19+
performance problems. `git-survey` attempts to measure and report on
20+
known problem areas.
21+
22+
Ref Selection and Reachable Objects
23+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24+
25+
In this first analysis phase, `git survey` will iterate over the set of
26+
requested branches, tags, and other refs and treewalk over all of the
27+
reachable commits, trees, and blobs and generate various statistics.
28+
29+
OPTIONS
30+
-------
31+
32+
--progress::
33+
Show progress. This is automatically enabled when interactive.
34+
35+
Ref Selection
36+
~~~~~~~~~~~~~
37+
38+
The following options control the set of refs that `git survey` will examine.
39+
By default, `git survey` will look at tags, local branches, and remote refs.
40+
If any of the following options are given, the default set is cleared and
41+
only refs for the given options are added.
42+
43+
--all-refs::
44+
Use all refs. This includes local branches, tags, remote refs,
45+
notes, and stashes. This option overrides all of the following.
46+
47+
--branches::
48+
Add local branches (`refs/heads/`) to the set.
49+
50+
--tags::
51+
Add tags (`refs/tags/`) to the set.
52+
53+
--remotes::
54+
Add remote branches (`refs/remote/`) to the set.
55+
56+
--detached::
57+
Add HEAD to the set.
58+
59+
--other::
60+
Add notes (`refs/notes/`) and stashes (`refs/stash/`) to the set.
61+
62+
OUTPUT
63+
------
64+
65+
By default, `git survey` will print information about the repository in a
66+
human-readable format that includes overviews and tables.
67+
68+
References Summary
69+
~~~~~~~~~~~~~~~~~~
70+
71+
The references summary includes a count of each kind of reference,
72+
including branches, remote refs, and tags (split by "all" and
73+
"annotated").
74+
75+
Reachable Object Summary
76+
~~~~~~~~~~~~~~~~~~~~~~~~
77+
78+
The reachable object summary shows the total number of each kind of Git
79+
object, including tags, commits, trees, and blobs.
80+
81+
GIT
82+
---
83+
Part of the linkgit:git[1] suite

Documentation/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ manpages = {
141141
'git-status.adoc' : 1,
142142
'git-stripspace.adoc' : 1,
143143
'git-submodule.adoc' : 1,
144+
'git-survey.adoc' : 1,
144145
'git-svn.adoc' : 1,
145146
'git-switch.adoc' : 1,
146147
'git-symbolic-ref.adoc' : 1,

0 commit comments

Comments
 (0)