Skip to content

Commit

Permalink
Merge branch 'microsoft/vfs-2.35.0'
Browse files Browse the repository at this point in the history
We actually only need the FSMonitor...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Oct 3, 2022
2 parents 0355083 + 2527e85 commit 6bfcbc9
Show file tree
Hide file tree
Showing 97 changed files with 13,793 additions and 266 deletions.
34 changes: 19 additions & 15 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
- [ ] 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
- [ ] I was not able to find an [open](https://github.com/microsoft/git/issues?q=is%3Aopen)
or [closed](https://github.com/microsoft/git/issues?q=is%3Aclosed) issue matching
what I'm seeing, including in [the `git-for-windows/git` tracker](https://github.com/git-for-windows/git/issues).

### Setup

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

```
$ git --version --build-options
** insert your machine's response here **
```

- Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
Are you using Scalar or VFS for Git?

** insert your answer here **

If VFS for Git, then what version?

```
$ cmd.exe /c ver
$ gvfs version
** insert your machine's response here **
```

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

```
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
> type "$env:USERPROFILE\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt
$ cmd.exe /c ver
** insert your machine's response here **
```
Expand Down Expand Up @@ -58,7 +58,11 @@ $ cat /etc/install-options.txt

** insert here **

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

** insert URL here **
* [ ] Public repo: **insert URL here**
* [ ] Windows monorepo
* [ ] Office monorepo
* [ ] Other Microsoft-internal repo: **insert name here**
* [ ] Other internal repo.
25 changes: 8 additions & 17 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
Thanks for taking the time to contribute to Git!

Those seeking to contribute to the Git for Windows fork should see
http://gitforwindows.org/#contribute on how to contribute Windows specific
enhancements.

If your contribution is for the core Git functions and documentation
please be aware that the Git community does not use the github.com issues
or pull request mechanism for their contributions.

Instead, we use the Git mailing list (git@vger.kernel.org) for code and
documentation submissions, code reviews, and bug reports. The
mailing list is plain text only (anything with HTML is sent directly
to the spam folder).

Nevertheless, you can use GitGitGadget (https://gitgitgadget.github.io/)
to conveniently send your Pull Requests commits to our mailing list.

Please read the "guidelines for contributing" linked above!
This fork contains changes specific to monorepo scenarios. If you are an
external contributor, then please detail your reason for submitting to
this fork:

* [ ] This is an early version of work already under review upstream.
* [ ] This change only applies to interactions with Azure DevOps and the
GVFS Protocol.
* [ ] This change only applies to the virtualization hook and VFS for Git.
92 changes: 92 additions & 0 deletions .github/workflows/release-apt-get.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: "release-apt-get"
on:
release:
types: [released]

workflow_dispatch:
inputs:
release:
description: 'Release Id'
required: true
default: 'latest'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: "Download Repo Client"
env:
AZ_SUB: ${{ secrets.AZURE_SUBSCRIPTION }}
run: |
az storage blob download --subscription "$AZ_SUB" --account-name esrpsigningstorage -c signing-resources -n azure-repoapi-client_2.0.1_amd64.deb -f repoclient.deb --auth-mode login
- name: "Install Repo Client"
run: |
sudo apt-get install python3-adal --yes
sudo dpkg -i repoclient.deb
rm repoclient.deb
- name: "Configure Repo Client"
uses: actions/github-script@v3
env:
AZURE_AAD_ID: ${{ secrets.AZURE_AAD_ID }}
AAD_CLIENT_SECRET: ${{ secrets.AAD_CLIENT_SECRET }}
with:
script: |
for (const key of ['AZURE_AAD_ID', 'AAD_CLIENT_SECRET']) {
if (!process.env[key]) throw new Error(`Required env var ${key} is missing!`)
}
const config = {
AADResource: 'https://microsoft.onmicrosoft.com/945999e9-da09-4b5b-878f-b66c414602c0',
AADTenant: '72f988bf-86f1-41af-91ab-2d7cd011db47',
AADAuthorityUrl: 'https://login.microsoftonline.com',
server: 'azure-apt-cat.cloudapp.net',
port: '443',
AADClientId: process.env.AZURE_AAD_ID,
AADClientSecret: process.env.AAD_CLIENT_SECRET,
repositoryId: ''
}
const fs = require('fs')
fs.writeFileSync('config.json', JSON.stringify(config, null, 2))
- name: "Get Release Asset"
id: get-asset
env:
RELEASE: ${{ github.event.inputs.release }}
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const { data } = await github.repos.getRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: process.env.RELEASE || 'latest'
})
const assets = data.assets.filter(asset => asset.name.endsWith('.deb'))
if (assets.length !== 1) {
throw new Error(`Unexpected number of .deb assets: ${assets.length}`)
}
const fs = require('fs')
const buffer = await github.repos.getReleaseAsset({
headers: {
accept: 'application/octet-stream'
},
owner: context.repo.owner,
repo: context.repo.repo,
asset_id: assets[0].id
})
console.log(buffer)
fs.writeFileSync(assets[0].name, Buffer.from(buffer.data))
core.setOutput('name', assets[0].name)
- name: "Publish to apt feed"
env:
RELEASE: ${{ github.event.inputs.release }}
run: |
repoclient -v v3 -c config.json package add --check --wait 300 ${{steps.get-asset.outputs.name}} -r ${{ secrets.HIRSUTE_REPO_ID }}
30 changes: 30 additions & 0 deletions .github/workflows/release-homebrew.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Update Homebrew Tap
on:
release:
types: [released]

jobs:
release:
runs-on: ubuntu-latest
steps:
- id: version
name: Compute version number
run: |
echo "::set-output name=result::$(echo $GITHUB_REF | sed -e "s/^refs\/tags\/v//")"
- id: hash
name: Compute release asset hash
uses: mjcheetham/asset-hash@v1
with:
asset: /git-(.*)\.pkg/
hash: sha256
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update scalar Cask
uses: mjcheetham/update-homebrew@v1.1
with:
token: ${{ secrets.HOMEBREW_TOKEN }}
tap: microsoft/git
name: microsoft-git
type: cask
version: ${{ steps.version.outputs.result }}
sha256: ${{ steps.hash.outputs.result }}
alwaysUsePullRequest: false
23 changes: 23 additions & 0 deletions .github/workflows/release-winget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "release-winget"
on:
release:
types: [released]

jobs:
release:
runs-on: windows-latest
steps:
- name: Publish manifest with winget-create
run: |
# Get correct release asset
$github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json
$asset = $github.release.assets | Where-Object -Property name -match '64-bit.exe$'
# Remove 'v' and 'vfs' from the version
$github.release.tag_name -match '\d.*'
$version = $Matches[0] -replace ".vfs",""
# Download and run wingetcreate
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
.\wingetcreate.exe update Microsoft.Git -u $asset.browser_download_url -v $version -o manifests -t "${{ secrets.WINGET_TOKEN }}" -s
shell: powershell
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
/git-gc
/git-get-tar-commit-id
/git-grep
/git-gvfs-helper
/git-hash-object
/git-help
/git-hook
Expand Down Expand Up @@ -173,6 +174,7 @@
/git-unpack-file
/git-unpack-objects
/git-update-index
/git-update-microsoft-git
/git-update-ref
/git-update-server-info
/git-upload-archive
Expand Down
59 changes: 59 additions & 0 deletions BRANCHES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Branches used in this repo
==========================

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.

Repo Branches
-------------

1. `vfs-#`

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.

#### Examples

```
vfs-2.27.0
vfs-2.30.0
```

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.

2. `vfs-#-exp`

These branches are for releasing experimental features to early adopters. They
should contain everything within the corresponding `vfs-#` branch; if the base
branch updates, then merge into the `vfs-#-exp` branch as well.

Tags
----

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.

Full releases are of the form `v2.XX.Y.vfs.Z.W` where `v2.XX.Y` comes from the
upstream version and `Z.W` are custom updates within our fork. Specifically,
the `.Z` value represents the "compatibility level" with VFS for Git. Only
increase this version when making a breaking change with a released version
of VFS for Git. The `.W` version is used for minor updates between major
versions.

Experimental releases are of the form `v2.XX.Y.vfs.Z.W.exp`. The `.exp`
suffix indicates that experimental features are available. The rest of the
version string comes from the full release tag. These versions will only
be made available as pre-releases on the releases page, never a full release.

Forking
-------

A personal fork of this repository and a branch in that repository should be used for development.

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.

#### Example

```
git clone <personal fork repo URL>
git remote add ms https://github.com/Microsoft/git.git
git checkout -b my-changes ms/vfs-2.20.0 --no-track
git push -fu origin HEAD
```
2 changes: 2 additions & 0 deletions Documentation/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ include::config/gui.txt[]

include::config/guitool.txt[]

include::config/gvfs.txt[]

include::config/help.txt[]

include::config/http.txt[]
Expand Down
57 changes: 57 additions & 0 deletions Documentation/config/core.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ Version 2 uses an opaque string so that the monitor can return
something that can be used to determine what files have changed
without race conditions.

core.virtualFilesystem::
If set, the value of this variable is used as a command which
will identify all files and directories that are present in
the working directory. Git will only track and update files
listed in the virtual file system. Using the virtual file system
will supersede the sparse-checkout settings which will be ignored.
See the "virtual file system" section of linkgit:githooks[5].

core.trustctime::
If false, the ctime differences between the index and the
working tree are ignored; useful when the inode change time
Expand Down Expand Up @@ -728,6 +736,55 @@ core.multiPackIndex::
single index. See linkgit:git-multi-pack-index[1] for more
information. Defaults to true.

core.gvfs::
Enable the features needed for GVFS. This value can be set to true
to indicate all features should be turned on or the bit values listed
below can be used to turn on specific features.
+
--
GVFS_SKIP_SHA_ON_INDEX::
Bit value 1
Disables the calculation of the sha when writing the index
GVFS_MISSING_OK::
Bit value 4
Normally git write-tree ensures that the objects referenced by the
directory exist in the object database. This option disables this check.
GVFS_NO_DELETE_OUTSIDE_SPARSECHECKOUT::
Bit value 8
When marking entries to remove from the index and the working
directory this option will take into account what the
skip-worktree bit was set to so that if the entry has the
skip-worktree bit set it will not be removed from the working
directory. This will allow virtualized working directories to
detect the change to HEAD and use the new commit tree to show
the files that are in the working directory.
GVFS_FETCH_SKIP_REACHABILITY_AND_UPLOADPACK::
Bit value 16
While performing a fetch with a virtual file system we know
that there will be missing objects and we don't want to download
them just because of the reachability of the commits. We also
don't want to download a pack file with commits, trees, and blobs
since these will be downloaded on demand. This flag will skip the
checks on the reachability of objects during a fetch as well as
the upload pack so that extraneous objects don't get downloaded.
GVFS_BLOCK_FILTERS_AND_EOL_CONVERSIONS::
Bit value 64
With a virtual file system we only know the file size before any
CRLF or smudge/clean filters processing is done on the client.
To prevent file corruption due to truncation or expansion with
garbage at the end, these filters must not run when the file
is first accessed and brought down to the client. Git.exe can't
currently tell the first access vs subsequent accesses so this
flag just blocks them from occurring at all.
GVFS_PREFETCH_DURING_FETCH::
Bit value 128
While performing a `git fetch` command, use the gvfs-helper to
perform a "prefetch" of commits and trees.
--

core.useGvfsHelper::
TODO

core.sparseCheckout::
Enable "sparse checkout" feature. See linkgit:git-sparse-checkout[1]
for more information.
Expand Down
5 changes: 5 additions & 0 deletions Documentation/config/gvfs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
gvfs.cache-server::
TODO

gvfs.sharedcache::
TODO
Loading

0 comments on commit 6bfcbc9

Please sign in to comment.