Skip to content

Commit aa1e2c6

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 40ecf35 + c881bc9 commit aa1e2c6

File tree

98 files changed

+7541
-295
lines changed

Some content is hidden

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

98 files changed

+7541
-295
lines changed

.github/workflows/git-artifacts.yml

Lines changed: 514 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/main.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ jobs:
137137
NO_PERL: 1
138138
GIT_CONFIG_PARAMETERS: "'user.name=CI' 'user.email=ci@git'"
139139
runs-on: windows-latest
140+
strategy:
141+
matrix:
142+
arch: [x64, arm64]
140143
steps:
141144
- uses: actions/checkout@v2
142145
- uses: git-for-windows/setup-git-for-windows-sdk@v1
@@ -146,26 +149,22 @@ jobs:
146149
repository: 'microsoft/vcpkg'
147150
path: 'compat/vcbuild/vcpkg'
148151
- name: download vcpkg artifacts
149-
shell: powershell
150-
run: |
151-
$urlbase = "https://dev.azure.com/git/git/_apis/build/builds"
152-
$id = ((Invoke-WebRequest -UseBasicParsing "${urlbase}?definitions=9&statusFilter=completed&resultFilter=succeeded&`$top=1").content | ConvertFrom-JSON).value[0].id
153-
$downloadUrl = ((Invoke-WebRequest -UseBasicParsing "${urlbase}/$id/artifacts").content | ConvertFrom-JSON).value[0].resource.downloadUrl
154-
(New-Object Net.WebClient).DownloadFile($downloadUrl, "compat.zip")
155-
Expand-Archive compat.zip -DestinationPath . -Force
156-
Remove-Item compat.zip
152+
uses: git-for-windows/get-azure-pipelines-artifact@v0
153+
with:
154+
repository: git/git
155+
definitionId: 9
157156
- name: add msbuild to PATH
158157
uses: microsoft/setup-msbuild@v1
159158
- name: copy dlls to root
160159
shell: cmd
161-
run: compat\vcbuild\vcpkg_copy_dlls.bat release
160+
run: compat\vcbuild\vcpkg_copy_dlls.bat release ${{ matrix.arch }}-windows
162161
- name: generate Visual Studio solution
163162
shell: bash
164163
run: |
165-
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/x64-windows \
166-
-DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON
164+
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/${{ matrix.arch }}-windows \
165+
-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 }}
167166
- name: MSBuild
168-
run: msbuild git.sln -property:Configuration=Release -property:Platform=x64 -maxCpuCount:4 -property:PlatformToolset=v142
167+
run: msbuild git.sln -property:Configuration=Release -property:Platform=${{ matrix.arch }} -maxCpuCount:4 -property:PlatformToolset=v142
169168
- name: bundle artifact tar
170169
shell: bash
171170
env:
@@ -179,7 +178,7 @@ jobs:
179178
- name: upload tracked files and build artifacts
180179
uses: actions/upload-artifact@v2
181180
with:
182-
name: vs-artifacts
181+
name: vs-artifacts-${{ matrix.arch }}
183182
path: artifacts
184183
vs-test:
185184
name: win+VS test
@@ -194,7 +193,7 @@ jobs:
194193
- name: download tracked files and build artifacts
195194
uses: actions/download-artifact@v2
196195
with:
197-
name: vs-artifacts
196+
name: vs-artifacts-x64
198197
path: ${{github.workspace}}
199198
- name: extract tracked files and build artifacts
200199
shell: bash

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
/git-format-patch
7373
/git-fsck
7474
/git-fsck-objects
75+
/git-fsmonitor--daemon
7576
/git-gc
7677
/git-get-tar-commit-id
7778
/git-grep
@@ -243,3 +244,4 @@ Release/
243244
/git.VC.db
244245
*.dSYM
245246
/contrib/buildsystems/out
247+
CMakeSettings.json

Documentation/config.txt

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

467467
include::config/sendemail.txt[]
468468

469+
include::config/sendpack.txt[]
470+
469471
include::config/sequencer.txt[]
470472

471473
include::config/showbranch.txt[]

Documentation/config/core.txt

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,50 @@ core.protectNTFS::
6262
Defaults to `true` on Windows, and `false` elsewhere.
6363

6464
core.fsmonitor::
65-
If set, the value of this variable is used as a command which
66-
will identify all files that may have changed since the
67-
requested date/time. This information is used to speed up git by
68-
avoiding unnecessary processing of files that have not changed.
69-
See the "fsmonitor-watchman" section of linkgit:githooks[5].
65+
If set, this variable contains the pathname of the "fsmonitor"
66+
hook command.
67+
+
68+
This hook command is used to identify all files that may have changed
69+
since the requested date/time. This information is used to speed up
70+
git by avoiding unnecessary scanning of files that have not changed.
71+
+
72+
See the "fsmonitor-watchman" section of linkgit:githooks[5].
73+
+
74+
Note: The value of this config setting is ignored if the (experimental)
75+
built-in file system monitor is enabled (see `core.useBuiltinFSMonitor`).
7076

7177
core.fsmonitorHookVersion::
72-
Sets the version of hook that is to be used when calling fsmonitor.
73-
There are currently versions 1 and 2. When this is not set,
74-
version 2 will be tried first and if it fails then version 1
75-
will be tried. Version 1 uses a timestamp as input to determine
76-
which files have changes since that time but some monitors
77-
like watchman have race conditions when used with a timestamp.
78-
Version 2 uses an opaque string so that the monitor can return
79-
something that can be used to determine what files have changed
80-
without race conditions.
78+
Sets the protocol version to be used when invoking the
79+
"fsmonitor" hook.
80+
+
81+
There are currently versions 1 and 2. When this is not set,
82+
version 2 will be tried first and if it fails then version 1
83+
will be tried. Version 1 uses a timestamp as input to determine
84+
which files have changes since that time but some monitors
85+
like Watchman have race conditions when used with a timestamp.
86+
Version 2 uses an opaque string so that the monitor can return
87+
something that can be used to determine what files have changed
88+
without race conditions.
89+
+
90+
Note: The value of this config setting is ignored if the
91+
built-in file system monitor is enabled (see `core.useBuiltinFSMonitor`).
92+
93+
core.useBuiltinFSMonitor::
94+
(EXPERIMENTAL) If set to true, enable the built-in file system monitor
95+
daemon for this working directory (linkgit:git-fsmonitor--daemon[1]).
96+
+
97+
Like hook-based file system monitors, the built-in file system monitor
98+
can speed up Git commands that need to refresh the Git index
99+
(e.g. `git status`) in a working directory with many files. The
100+
built-in monitor eliminates the need to install and maintain an
101+
external third-party tool.
102+
+
103+
The built-in file system monitor is currently available only on a
104+
limited set of supported platforms. Currently, this includes Windows
105+
and MacOS.
106+
+
107+
Note: if this config setting is set to `true`, the values of
108+
`core.fsmonitor` and `core.fsmonitorHookVersion` are ignored.
81109

82110
core.trustctime::
83111
If false, the ctime differences between the index and the

Documentation/config/http.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,13 @@ http.sslBackend::
173173

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

182184
http.schannelUseSSLCAInfo::
183185
As of cURL v7.60.0, the Secure Channel backend can use the
@@ -187,6 +189,11 @@ http.schannelUseSSLCAInfo::
187189
when the `schannel` backend was configured via `http.sslBackend`,
188190
unless `http.schannelUseSSLCAInfo` overrides this behavior.
189191

192+
http.sslAutoClientCert::
193+
As of cURL v7.77.0, the Secure Channel backend won't automatically
194+
send client certificates from the Windows Certificate Store anymore.
195+
To opt in to the old behavior, http.sslAutoClientCert can be set.
196+
190197
http.pinnedpubkey::
191198
Public key of the https service. It may either be the filename of
192199
a PEM or DER encoded public key file or a string starting with

Documentation/config/sendpack.txt

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.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
git-fsmonitor--daemon(1)
2+
========================
3+
4+
NAME
5+
----
6+
git-fsmonitor--daemon - (EXPERIMENTAL) A Built-in File System Monitor
7+
8+
SYNOPSIS
9+
--------
10+
[verse]
11+
'git fsmonitor--daemon' start
12+
'git fsmonitor--daemon' run
13+
'git fsmonitor--daemon' stop
14+
'git fsmonitor--daemon' status
15+
16+
DESCRIPTION
17+
-----------
18+
19+
NOTE! This command is still only an experiment, subject to change dramatically
20+
(or even to be abandoned).
21+
22+
A daemon to watch the working directory for file and directory
23+
changes using platform-specific file system notification facilities.
24+
25+
This daemon communicates directly with commands like `git status`
26+
using the link:technical/api-simple-ipc.html[simple IPC] interface
27+
instead of the slower linkgit:githooks[5] interface.
28+
29+
This daemon is built into Git so that no third-party tools are
30+
required.
31+
32+
OPTIONS
33+
-------
34+
35+
start::
36+
Starts a daemon in the background.
37+
38+
run::
39+
Runs a daemon in the foreground.
40+
41+
stop::
42+
Stops the daemon running in the current working
43+
directory, if present.
44+
45+
status::
46+
Exits with zero status if a daemon is watching the
47+
current working directory.
48+
49+
REMARKS
50+
-------
51+
52+
This daemon is a long running process used to watch a single working
53+
directory and maintain a list of the recently changed files and
54+
directories. Performance of commands such as `git status` can be
55+
increased if they just ask for a summary of changes to the working
56+
directory and can avoid scanning the disk.
57+
58+
When `core.useBuiltinFSMonitor` is set to `true` (see
59+
linkgit:git-config[1]) commands, such as `git status`, will ask the
60+
daemon for changes and automatically start it (if necessary).
61+
62+
For more information see the "File System Monitor" section in
63+
linkgit:git-update-index[1].
64+
65+
CAVEATS
66+
-------
67+
68+
The fsmonitor daemon does not currently know about submodules and does
69+
not know to filter out file system events that happen within a
70+
submodule. If fsmonitor daemon is watching a super repo and a file is
71+
modified within the working directory of a submodule, it will report
72+
the change (as happening against the super repo). However, the client
73+
will properly ignore these extra events, so performance may be affected
74+
but it will not cause an incorrect result.
75+
76+
GIT
77+
---
78+
Part of the linkgit:git[1] suite

Documentation/git-update-index.txt

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,9 @@ FILE SYSTEM MONITOR
498498
This feature is intended to speed up git operations for repos that have
499499
large working directories.
500500

501-
It enables git to work together with a file system monitor (see the
501+
It enables git to work together with a file system monitor (see
502+
linkgit:git-fsmonitor--daemon[1]
503+
and the
502504
"fsmonitor-watchman" section of linkgit:githooks[5]) that can
503505
inform it as to what files have been modified. This enables git to avoid
504506
having to lstat() every file to find modified files.
@@ -508,17 +510,18 @@ performance by avoiding the cost of scanning the entire working directory
508510
looking for new files.
509511

510512
If you want to enable (or disable) this feature, it is easier to use
511-
the `core.fsmonitor` configuration variable (see
512-
linkgit:git-config[1]) than using the `--fsmonitor` option to
513-
`git update-index` in each repository, especially if you want to do so
514-
across all repositories you use, because you can set the configuration
515-
variable in your `$HOME/.gitconfig` just once and have it affect all
516-
repositories you touch.
517-
518-
When the `core.fsmonitor` configuration variable is changed, the
519-
file system monitor is added to or removed from the index the next time
520-
a command reads the index. When `--[no-]fsmonitor` are used, the file
521-
system monitor is immediately added to or removed from the index.
513+
the `core.fsmonitor` or `core.useBuiltinFSMonitor` configuration
514+
variable (see linkgit:git-config[1]) than using the `--fsmonitor`
515+
option to `git update-index` in each repository, especially if you
516+
want to do so across all repositories you use, because you can set the
517+
configuration variable in your `$HOME/.gitconfig` just once and have
518+
it affect all repositories you touch.
519+
520+
When the `core.fsmonitor` or `core.useBuiltinFSMonitor` configuration
521+
variable is changed, the file system monitor is added to or removed
522+
from the index the next time a command reads the index. When
523+
`--[no-]fsmonitor` are used, the file system monitor is immediately
524+
added to or removed from the index.
522525

523526
CONFIGURATION
524527
-------------

Documentation/githooks.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,8 @@ fsmonitor-watchman
593593

594594
This hook is invoked when the configuration option `core.fsmonitor` is
595595
set to `.git/hooks/fsmonitor-watchman` or `.git/hooks/fsmonitor-watchmanv2`
596-
depending on the version of the hook to use.
596+
depending on the version of the hook to use, unless overridden via
597+
`core.useBuiltinFSMonitor` (see linkgit:git-config[1]).
597598

598599
Version 1 takes two arguments, a version (1) and the time in elapsed
599600
nanoseconds since midnight, January 1, 1970.

0 commit comments

Comments
 (0)