Skip to content

Commit 06cf70e

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 9c7962f + 5123dd5 commit 06cf70e

File tree

133 files changed

+16772
-2257
lines changed

Some content is hidden

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

133 files changed

+16772
-2257
lines changed

.github/workflows/main.yml

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

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

+2
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@
165165
/git-submodule
166166
/git-submodule--helper
167167
/git-subtree
168+
/git-survey
168169
/git-svn
169170
/git-switch
170171
/git-symbolic-ref
@@ -251,5 +252,6 @@ Release/
251252
/git.VC.db
252253
*.dSYM
253254
/contrib/buildsystems/out
255+
CMakeSettings.json
254256
/contrib/libgit-rs/target
255257
/contrib/libgit-sys/target

Documentation/config.adoc

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

-6
Original file line numberDiff line numberDiff line change
@@ -691,12 +691,6 @@ core.unsetenvvars::
691691
Defaults to `PERL5LIB` to account for the fact that Git for
692692
Windows insists on using its own Perl interpreter.
693693

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

Documentation/config/feature.adoc

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ walking fewer objects.
2020
+
2121
* `pack.allowPackReuse=multi` may improve the time it takes to create a pack by
2222
reusing objects from multiple packs instead of just one.
23+
+
24+
* `pack.usePathWalk` may speed up packfile creation and make the packfiles be
25+
significantly smaller in the presence of certain filename collisions with Git's
26+
default name-hash.
2327
2428
feature.manyFiles::
2529
Enable config options that optimize for repos with many files in the

Documentation/config/http.adoc

+12-5
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/pack.adoc

+8
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,14 @@ pack.useSparse::
155155
commits contain certain types of direct renames. Default is
156156
`true`.
157157

158+
pack.usePathWalk::
159+
When true, git will default to using the '--path-walk' option in
160+
'git pack-objects' when the '--revs' option is present. This
161+
algorithm groups objects by path to maximize the ability to
162+
compute delta chains across historical versions of the same
163+
object. This may disable other options, such as using bitmaps to
164+
enumerate objects.
165+
158166
pack.preferBitmapTips::
159167
When selecting which commits will receive bitmaps, prefer a
160168
commit at the tip of any reference that is a suffix of any value

Documentation/config/sendpack.adoc

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

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

+4
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-pack-objects.adoc

+11-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ SYNOPSIS
1616
[--cruft] [--cruft-expiration=<time>]
1717
[--stdout [--filter=<filter-spec>] | <base-name>]
1818
[--shallow] [--keep-true-parents] [--[no-]sparse]
19-
[--name-hash-version=<n>] < <object-list>
19+
[--name-hash-version=<n>] [--path-walk] < <object-list>
2020

2121

2222
DESCRIPTION
@@ -375,6 +375,16 @@ many different directories. At the moment, this version is not allowed
375375
when writing reachability bitmap files with `--write-bitmap-index` and it
376376
will be automatically changed to version `1`.
377377
378+
--path-walk::
379+
By default, `git pack-objects` walks objects in an order that
380+
presents trees and blobs in an order unrelated to the path they
381+
appear relative to a commit's root tree. The `--path-walk` option
382+
enables a different walking algorithm that organizes trees and
383+
blobs by path. This has the potential to improve delta compression
384+
especially in the presence of filenames that cause collisions in
385+
Git's default name-hash algorithm. Due to changing how the objects
386+
are walked, this option is not compatible with `--delta-islands`,
387+
`--shallow`, or `--filter`.
378388
379389
DELTA ISLANDS
380390
-------------

Documentation/git-repack.adoc

+13-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ SYNOPSIS
1111
[verse]
1212
'git repack' [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m]
1313
[--window=<n>] [--depth=<n>] [--threads=<n>] [--keep-pack=<pack-name>]
14-
[--write-midx] [--name-hash-version=<n>]
14+
[--write-midx] [--name-hash-version=<n>] [--path-walk]
1515

1616
DESCRIPTION
1717
-----------
@@ -255,6 +255,18 @@ linkgit:git-multi-pack-index[1]).
255255
Provide this argument to the underlying `git pack-objects` process.
256256
See linkgit:git-pack-objects[1] for full details.
257257

258+
--path-walk::
259+
This option passes the `--path-walk` option to the underlying
260+
`git pack-options` process (see linkgit:git-pack-objects[1]).
261+
By default, `git pack-objects` walks objects in an order that
262+
presents trees and blobs in an order unrelated to the path they
263+
appear relative to a commit's root tree. The `--path-walk` option
264+
enables a different walking algorithm that organizes trees and
265+
blobs by path. This has the potential to improve delta compression
266+
especially in the presence of filenames that cause collisions in
267+
Git's default name-hash algorithm. Due to changing how the objects
268+
are walked, this option is not compatible with `--delta-islands`
269+
or `--filter`.
258270

259271
CONFIGURATION
260272
-------------

0 commit comments

Comments
 (0)