Skip to content

Commit f20b0a4

Browse files
committed
Merge branch 'microsoft/vfs-2.35.0'
We actually only need the FSMonitor... Signed-off-by: Johannes Schindelin <[email protected]>
2 parents 2d2d322 + 676c07e commit f20b0a4

File tree

103 files changed

+13997
-268
lines changed

Some content is hidden

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

103 files changed

+13997
-268
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
- [ ] I was not able to find an [open](https://github.com/git-for-windows/git/issues?q=is%3Aopen) or [closed](https://github.com/git-for-windows/git/issues?q=is%3Aclosed) issue matching what I'm seeing
1+
- [ ] I was not able to find an [open](https://github.com/microsoft/git/issues?q=is%3Aopen)
2+
or [closed](https://github.com/microsoft/git/issues?q=is%3Aclosed) issue matching
3+
what I'm seeing, including in [the `git-for-windows/git` tracker](https://github.com/git-for-windows/git/issues).
24

35
### Setup
46

5-
- Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
7+
- Which version of `microsoft/git` are you using? Is it 32-bit or 64-bit?
68

79
```
810
$ git --version --build-options
911
1012
** insert your machine's response here **
1113
```
1214

13-
- Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
15+
Are you using Scalar or VFS for Git?
16+
17+
** insert your answer here **
18+
19+
If VFS for Git, then what version?
1420

1521
```
16-
$ cmd.exe /c ver
22+
$ gvfs version
1723
1824
** insert your machine's response here **
1925
```
2026

21-
- What options did you set as part of the installation? Or did you choose the
22-
defaults?
27+
- Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
2328

2429
```
25-
# One of the following:
26-
> type "C:\Program Files\Git\etc\install-options.txt"
27-
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
28-
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
29-
> type "$env:USERPROFILE\AppData\Local\Programs\Git\etc\install-options.txt"
30-
$ cat /etc/install-options.txt
30+
$ cmd.exe /c ver
3131
3232
** insert your machine's response here **
3333
```
@@ -58,7 +58,11 @@ $ cat /etc/install-options.txt
5858

5959
** insert here **
6060

61-
- If the problem was occurring with a specific repository, can you provide the
62-
URL to that repository to help us with testing?
61+
- If the problem was occurring with a specific repository, can you specify
62+
the repository?
6363

64-
** insert URL here **
64+
* [ ] Public repo: **insert URL here**
65+
* [ ] Windows monorepo
66+
* [ ] Office monorepo
67+
* [ ] Other Microsoft-internal repo: **insert name here**
68+
* [ ] Other internal repo.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
11
Thanks for taking the time to contribute to Git!
22

3-
Those seeking to contribute to the Git for Windows fork should see
4-
http://gitforwindows.org/#contribute on how to contribute Windows specific
5-
enhancements.
6-
7-
If your contribution is for the core Git functions and documentation
8-
please be aware that the Git community does not use the github.com issues
9-
or pull request mechanism for their contributions.
10-
11-
Instead, we use the Git mailing list ([email protected]) for code and
12-
documentation submissions, code reviews, and bug reports. The
13-
mailing list is plain text only (anything with HTML is sent directly
14-
to the spam folder).
15-
16-
Nevertheless, you can use GitGitGadget (https://gitgitgadget.github.io/)
17-
to conveniently send your Pull Requests commits to our mailing list.
18-
19-
For a single-commit pull request, please *leave the pull request description
20-
empty*: your commit message itself should describe your changes.
21-
22-
Please read the "guidelines for contributing" linked above!
3+
This fork contains changes specific to monorepo scenarios. If you are an
4+
external contributor, then please detail your reason for submitting to
5+
this fork:
6+
7+
* [ ] This is an early version of work already under review upstream.
8+
* [ ] This change only applies to interactions with Azure DevOps and the
9+
GVFS Protocol.
10+
* [ ] This change only applies to the virtualization hook and VFS for Git.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Update Homebrew Tap
2+
on:
3+
release:
4+
types: [released]
5+
6+
permissions:
7+
id-token: write # required for Azure login via OIDC
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
environment: release
13+
steps:
14+
- id: version
15+
name: Compute version number
16+
run: |
17+
echo "result=$(echo $GITHUB_REF | sed -e "s/^refs\/tags\/v//")" >>$GITHUB_OUTPUT
18+
- id: hash
19+
name: Compute release asset hash
20+
uses: mjcheetham/[email protected]
21+
with:
22+
asset: /git-(.*)\.pkg/
23+
hash: sha256
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
- name: Log into Azure
26+
uses: azure/login@v2
27+
with:
28+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
29+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
30+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
31+
- name: Retrieve token
32+
id: token
33+
run: |
34+
az keyvault secret show \
35+
--name ${{ secrets.HOMEBREW_TOKEN_SECRET_NAME }} \
36+
--vault-name ${{ secrets.AZURE_VAULT }} \
37+
--query "value" -o tsv >token &&
38+
# avoid outputting the token under `set -x` by using `sed` instead of `echo`
39+
sed s/^/::add-mask::/ <token &&
40+
sed s/^/result=/ <token >>$GITHUB_OUTPUT &&
41+
rm token
42+
- name: Update scalar Cask
43+
uses: mjcheetham/[email protected]
44+
with:
45+
token: ${{ steps.token.outputs.result }}
46+
tap: microsoft/git
47+
name: microsoft-git
48+
type: cask
49+
version: ${{ steps.version.outputs.result }}
50+
sha256: ${{ steps.hash.outputs.result }}
51+
alwaysUsePullRequest: false

.github/workflows/release-winget.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: "release-winget"
2+
on:
3+
release:
4+
types: [released]
5+
6+
workflow_dispatch:
7+
inputs:
8+
release:
9+
description: 'Release Id'
10+
required: true
11+
default: 'latest'
12+
13+
permissions:
14+
id-token: write # required for Azure login via OIDC
15+
16+
jobs:
17+
release:
18+
runs-on: windows-latest
19+
environment: release
20+
steps:
21+
- name: Log into Azure
22+
uses: azure/login@v2
23+
with:
24+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
25+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
26+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
27+
28+
- name: Publish manifest with winget-create
29+
run: |
30+
# Get correct release asset
31+
$github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json
32+
$asset = $github.release.assets | Where-Object -Property name -match '64-bit.exe$'
33+
34+
# Remove 'v' and 'vfs' from the version
35+
$github.release.tag_name -match '\d.*'
36+
$version = $Matches[0] -replace ".vfs",""
37+
38+
# Download wingetcreate and create manifests
39+
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
40+
.\wingetcreate.exe update Microsoft.Git -u $asset.browser_download_url -v $version -o manifests
41+
42+
# Manually substitute the name of the default branch in the License
43+
# and Copyright URLs since the tooling cannot do that for us.
44+
$shortenedVersion = $version -replace ".{4}$"
45+
$manifestPath = dir -Path ./manifests -Filter Microsoft.Git.locale.en-US.yaml -Recurse | %{$_.FullName}
46+
sed -i "s/vfs-[.0-9]*/vfs-$shortenedVersion/g" "$manifestPath"
47+
48+
# Submit manifests
49+
$manifestDirectory = Split-Path "$manifestPath"
50+
.\wingetcreate.exe submit -t "(az keyvault secret show --name ${{ secrets.WINGET_TOKEN_SECRET_NAME }} --vault-name ${{ secrets.AZURE_VAULT }} --query "value")" $manifestDirectory
51+
shell: powershell

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
/git-gc
7575
/git-get-tar-commit-id
7676
/git-grep
77+
/git-gvfs-helper
7778
/git-hash-object
7879
/git-help
7980
/git-hook
@@ -173,6 +174,7 @@
173174
/git-unpack-file
174175
/git-unpack-objects
175176
/git-update-index
177+
/git-update-microsoft-git
176178
/git-update-ref
177179
/git-update-server-info
178180
/git-upload-archive

BRANCHES.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Branches used in this repo
2+
==========================
3+
4+
The document explains the branching structure that we are using in the VFSForGit repository as well as the forking strategy that we have adopted for contributing.
5+
6+
Repo Branches
7+
-------------
8+
9+
1. `vfs-#`
10+
11+
These branches are used to track the specific version that match Git for Windows with the VFSForGit specific patches on top. When a new version of Git for Windows is released, the VFSForGit patches will be rebased on that windows version and a new gvfs-# branch created to create pull requests against.
12+
13+
#### Examples
14+
15+
```
16+
vfs-2.27.0
17+
vfs-2.30.0
18+
```
19+
20+
The versions of git for VFSForGit are based on the Git for Windows versions. v2.20.0.vfs.1 will correspond with the v2.20.0.windows.1 with the VFSForGit specific patches applied to the windows version.
21+
22+
2. `vfs-#-exp`
23+
24+
These branches are for releasing experimental features to early adopters. They
25+
should contain everything within the corresponding `vfs-#` branch; if the base
26+
branch updates, then merge into the `vfs-#-exp` branch as well.
27+
28+
Tags
29+
----
30+
31+
We are using annotated tags to build the version number for git. The build will look back through the commit history to find the first tag matching `v[0-9]*vfs*` and build the git version number using that tag.
32+
33+
Full releases are of the form `v2.XX.Y.vfs.Z.W` where `v2.XX.Y` comes from the
34+
upstream version and `Z.W` are custom updates within our fork. Specifically,
35+
the `.Z` value represents the "compatibility level" with VFS for Git. Only
36+
increase this version when making a breaking change with a released version
37+
of VFS for Git. The `.W` version is used for minor updates between major
38+
versions.
39+
40+
Experimental releases are of the form `v2.XX.Y.vfs.Z.W.exp`. The `.exp`
41+
suffix indicates that experimental features are available. The rest of the
42+
version string comes from the full release tag. These versions will only
43+
be made available as pre-releases on the releases page, never a full release.
44+
45+
Forking
46+
-------
47+
48+
A personal fork of this repository and a branch in that repository should be used for development.
49+
50+
These branches should be based on the latest vfs-# branch. If there are work in progress pull requests that you have based on a previous version branch when a new version branch is created, you will need to move your patches to the new branch to get them in that latest version.
51+
52+
#### Example
53+
54+
```
55+
git clone <personal fork repo URL>
56+
git remote add ms https://github.com/Microsoft/git.git
57+
git checkout -b my-changes ms/vfs-2.20.0 --no-track
58+
git push -fu origin HEAD
59+
```

Documentation/config.txt

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

449449
include::config/guitool.txt[]
450450

451+
include::config/gvfs.txt[]
452+
451453
include::config/help.txt[]
452454

453455
include::config/http.txt[]

Documentation/config/core.txt

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ Version 2 uses an opaque string so that the monitor can return
111111
something that can be used to determine what files have changed
112112
without race conditions.
113113

114+
core.virtualFilesystem::
115+
If set, the value of this variable is used as a command which
116+
will identify all files and directories that are present in
117+
the working directory. Git will only track and update files
118+
listed in the virtual file system. Using the virtual file system
119+
will supersede the sparse-checkout settings which will be ignored.
120+
See the "virtual file system" section of linkgit:githooks[5].
121+
114122
core.trustctime::
115123
If false, the ctime differences between the index and the
116124
working tree are ignored; useful when the inode change time
@@ -743,6 +751,55 @@ core.multiPackIndex::
743751
single index. See linkgit:git-multi-pack-index[1] for more
744752
information. Defaults to true.
745753

754+
core.gvfs::
755+
Enable the features needed for GVFS. This value can be set to true
756+
to indicate all features should be turned on or the bit values listed
757+
below can be used to turn on specific features.
758+
+
759+
--
760+
GVFS_SKIP_SHA_ON_INDEX::
761+
Bit value 1
762+
Disables the calculation of the sha when writing the index
763+
GVFS_MISSING_OK::
764+
Bit value 4
765+
Normally git write-tree ensures that the objects referenced by the
766+
directory exist in the object database. This option disables this check.
767+
GVFS_NO_DELETE_OUTSIDE_SPARSECHECKOUT::
768+
Bit value 8
769+
When marking entries to remove from the index and the working
770+
directory this option will take into account what the
771+
skip-worktree bit was set to so that if the entry has the
772+
skip-worktree bit set it will not be removed from the working
773+
directory. This will allow virtualized working directories to
774+
detect the change to HEAD and use the new commit tree to show
775+
the files that are in the working directory.
776+
GVFS_FETCH_SKIP_REACHABILITY_AND_UPLOADPACK::
777+
Bit value 16
778+
While performing a fetch with a virtual file system we know
779+
that there will be missing objects and we don't want to download
780+
them just because of the reachability of the commits. We also
781+
don't want to download a pack file with commits, trees, and blobs
782+
since these will be downloaded on demand. This flag will skip the
783+
checks on the reachability of objects during a fetch as well as
784+
the upload pack so that extraneous objects don't get downloaded.
785+
GVFS_BLOCK_FILTERS_AND_EOL_CONVERSIONS::
786+
Bit value 64
787+
With a virtual file system we only know the file size before any
788+
CRLF or smudge/clean filters processing is done on the client.
789+
To prevent file corruption due to truncation or expansion with
790+
garbage at the end, these filters must not run when the file
791+
is first accessed and brought down to the client. Git.exe can't
792+
currently tell the first access vs subsequent accesses so this
793+
flag just blocks them from occurring at all.
794+
GVFS_PREFETCH_DURING_FETCH::
795+
Bit value 128
796+
While performing a `git fetch` command, use the gvfs-helper to
797+
perform a "prefetch" of commits and trees.
798+
--
799+
800+
core.useGvfsHelper::
801+
TODO
802+
746803
core.sparseCheckout::
747804
Enable "sparse checkout" feature. See linkgit:git-sparse-checkout[1]
748805
for more information.

Documentation/config/gvfs.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
gvfs.cache-server::
2+
TODO
3+
4+
gvfs.sharedcache::
5+
TODO

Documentation/config/status.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,25 @@ status.submoduleSummary::
7777
the --ignore-submodules=dirty command-line option or the 'git
7878
submodule summary' command, which shows a similar output but does
7979
not honor these settings.
80+
81+
status.deserializePath::
82+
EXPERIMENTAL, Pathname to a file containing cached status results
83+
generated by `--serialize`. This will be overridden by
84+
`--deserialize=<path>` on the command line. If the cache file is
85+
invalid or stale, git will fall-back and compute status normally.
86+
87+
status.deserializeWait::
88+
EXPERIMENTAL, Specifies what `git status --deserialize` should do
89+
if the serialization cache file is stale and whether it should
90+
fall-back and compute status normally. This will be overridden by
91+
`--deserialize-wait=<value>` on the command line.
92+
+
93+
--
94+
* `fail` - cause git to exit with an error when the status cache file
95+
is stale; this is intended for testing and debugging.
96+
* `block` - cause git to spin and periodically retry the cache file
97+
every 100 ms; this is intended to help coordinate with another git
98+
instance concurrently computing the cache file.
99+
* `no` - to immediately fall-back if cache file is stale. This is the default.
100+
* `<timeout>` - time (in tenths of a second) to spin and retry.
101+
--

0 commit comments

Comments
 (0)