Skip to content

[DO NOT MERGE] Tentative vfs-2.25.1 branch #248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 160 commits into from
Feb 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
522e641
t1091: use check_files to reduce boilerplate
derrickstolee Jan 24, 2020
d622c34
t1091: improve here-docs
derrickstolee Jan 24, 2020
3c75406
sparse-checkout: create leading directories
derrickstolee Jan 24, 2020
47dbf10
clone: fix --sparse option with URLs
derrickstolee Jan 24, 2020
7aa9ef2
sparse-checkout: fix documentation typo for core.sparseCheckoutCone
peff Jan 24, 2020
41de0c6
sparse-checkout: cone mode does not recognize "**"
derrickstolee Jan 24, 2020
9e6d3e6
sparse-checkout: detect short patterns
derrickstolee Jan 24, 2020
9abc60f
sparse-checkout: warn on globs in cone patterns
derrickstolee Jan 31, 2020
4f52c2c
sparse-checkout: properly match escaped characters
derrickstolee Jan 31, 2020
d585f0e
sparse-checkout: write escaped patterns in cone mode
derrickstolee Jan 31, 2020
bd64de4
sparse-checkout: unquote C-style strings over --stdin
derrickstolee Jan 31, 2020
e55682e
sparse-checkout: use C-style quotes in 'list' subcommand
derrickstolee Jan 31, 2020
e53ffe2
sparse-checkout: escape all glob characters on write
derrickstolee Jan 31, 2020
d2e65f4
sparse-checkout: improve docs around 'set' in cone mode
derrickstolee Jan 31, 2020
f998a3f
sparse-checkout: fix cone mode behavior mismatch
derrickstolee Jan 31, 2020
6fb705a
sparse-checkout: extract add_patterns_from_input()
derrickstolee Feb 11, 2020
4bf0c06
sparse-checkout: extract pattern update from 'set' subcommand
derrickstolee Feb 11, 2020
2631dc8
sparse-checkout: create 'add' subcommand
derrickstolee Feb 11, 2020
ef07659
sparse-checkout: work with Windows paths
derrickstolee Feb 11, 2020
aec00fb
reset --stdin: trim carriage return from the paths
Apr 5, 2017
91ce57e
Merge 'gvfs-preamble' into HEAD
dscho Jun 11, 2018
ddae419
gvfs: start by adding the -gvfs suffix to the version
sanoursa Jan 24, 2017
35222f0
gvfs: ensure that the version is based on a GVFS tag
dscho Apr 4, 2017
553b86f
gvfs: add a GVFS-specific header file
Jan 24, 2017
c6ab81b
gvfs: add the core.gvfs config setting
Jan 24, 2017
ca9383b
gvfs: add the feature to skip writing the index' SHA-1
Jan 24, 2017
f030eb8
gvfs: add the feature that blobs may be missing
Jan 24, 2017
1259c93
gvfs: prevent files to be deleted outside the sparse checkout
May 18, 2016
518cc2c
gvfs: optionally skip reachability checks/upload pack during fetch
May 30, 2016
c9984b7
Add a new run_hook_argv() function
dscho Nov 30, 2016
5d0d824
gvfs: ensure all filters and EOL conversions are blocked
Jun 15, 2016
5703d80
gvfs: allow "virtualizing" objects
Jan 10, 2017
8aa1a54
gvfs: add global command pre and post hook procs
May 24, 2016
f42366e
Allow hooks to be run before setup_git_directory()
dscho Mar 6, 2017
50a7858
gvfs: introduce pre/post command hooks
Jan 24, 2017
60b95f2
Hydrate missing loose objects in check_and_freshen()
Mar 15, 2017
38d8dc4
sparse-checkout: update files with a modify/delete conflict
Feb 22, 2017
c6a4f50
t0400: verify that the hook is called correctly from a subdirectory
dscho Mar 16, 2017
00c1a61
Add support for read-object as a background process to retrieve missi…
Jul 18, 2017
6774bf9
sparse-checkout: avoid writing entries with the skip-worktree bit
Mar 1, 2017
abe3c84
Pass PID of git process to hooks.
alepauly Apr 10, 2017
5e513a1
sha1_file: when writing objects, skip the read_object_hook
dscho Sep 8, 2017
abce59c
Fix reset when using the sparse-checkout feature.
Mar 15, 2017
251a28a
pre-command: always respect core.hooksPath
dscho Aug 7, 2017
40bdcff
Merge 'read-object-hook' into HEAD
dscho Jun 11, 2018
ee592f6
Do not remove files outside the sparse-checkout
Apr 5, 2017
5f63c59
Merge 'pre-post-command-hooks' into HEAD
dscho Jun 11, 2018
f1c3cea
Merge 'sparse-checkout-fixes' into HEAD
dscho Jun 11, 2018
f555d49
Teach ahead-behind and serialized status to play nicely together
jamill Jan 10, 2018
1c0c811
gvfs: refactor loading the core.gvfs config value
Apr 14, 2017
d4336ed
status: serialize to path
jeffhostetler Feb 2, 2018
bbf8739
status: add status serialization mechanism
jeffhostetler Aug 22, 2017
630ecb7
cache-tree: remove use of strbuf_addf in update_one
Jul 3, 2017
c9e80e2
status: reject deserialize in V2 and conflicts
jeffhostetler Feb 7, 2018
11b81fa
Merge branch 'serialize_status_gvfs'
dscho Jun 11, 2018
850f4c3
Merge branch 'ahead-behind-and-serialized-status'
dscho Jun 11, 2018
b7d8c58
fsck: use ERROR_MULTI_PACK_INDEX
derrickstolee Sep 24, 2018
3eae157
t5516: relax error message pattern
derrickstolee Aug 21, 2019
694aceb
upload-pack: fix race condition in error messages
derrickstolee Aug 27, 2019
6c11c6a
sparse-checkout: allow one-character directories in cone mode
derrickstolee Feb 20, 2020
0fab055
Add virtual file system settings and hook proc
benpeart Jan 11, 2018
162ac55
Update the virtualfilesystem support
benpeart Jun 7, 2018
85aef2e
virtualfilesystem: don't run the virtual file system hook if the inde…
benpeart Aug 1, 2018
42230cc
virtualfilesystem: fix bug with symlinks being ignored
benpeart Sep 25, 2018
f41adf2
virtualfilesystem: check if directory is included
Oct 9, 2018
4a54e81
vfs: fix case where directories not handled correctly
jamill Nov 20, 2018
92e1e13
status: fix rename reporting when using serialization cache
jeffhostetler Jul 25, 2018
c5bf92a
commit: add generation to pop_most_recent_commit()
derrickstolee Jun 13, 2018
f6b6719
Merge 'virtual-file-system-support'
dscho Jun 11, 2018
3c67486
status: add comments for ahead_behind_flags in serialization
jeffhostetler Jul 25, 2018
970ade5
Merge 'gvfs/ds/generation-numbers-update'
dscho Jun 11, 2018
81921ed
serialize-status: serialize global and repo-local exclude file metadata
jeffhostetler Jul 20, 2018
df345f1
Merge pull request #6 from jeffhostetler/gvfs-serialize-status-rename
jeffhostetler Jul 26, 2018
c5ef02a
status: deserialization wait
jeffhostetler Jul 25, 2018
979ba3c
Merge pull request #1 from jeffhostetler/gvfs-serialize-exclude
jeffhostetler Jul 27, 2018
0636e7b
rebase/stash: make post-command hook work again
dscho Oct 12, 2018
5232c36
Merge pull request #7 from jeffhostetler/gvfs-status-serialize-wait
jeffhostetler Jul 31, 2018
dcca057
Merge pull request #36 Avoid `sane_execvp` in `git rebase` and `git s…
derrickstolee Oct 12, 2018
64f5742
send-pack: do not check for sha1 file when GVFS_MISSING_OK set
Nov 16, 2018
a2a2345
Merge pull request #24 Match multi-pack-index feature from upstream
dscho Oct 18, 2018
d34347a
gvfs: block unsupported commands when running in a GVFS repo
benpeart Dec 6, 2018
f3dccb4
Merge pull request #68 send-pack do not check for sha1 file when GVFS…
Nov 27, 2018
4077256
Merge pull request #91 from benpeart/block-commands
benpeart Dec 13, 2018
db1cc6d
gvfs:trace2:data: add trace2 tracing around read_object_process
jeffhostetler Sep 26, 2018
aae47c6
gvfs:trace2:data: status deserialization information
jeffhostetler Sep 26, 2018
0e538f6
gvfs:trace2:data: status serialization
jeffhostetler Jan 7, 2019
d906aaf
gvfs:trace2:data: add vfs stats
jeffhostetler Nov 19, 2018
fc0fe94
trace2: refactor setting process starting time
jeffhostetler Apr 15, 2019
597a455
trace2:gvfs:experiment: clear_ce_flags_1
jeffhostetler Apr 30, 2019
9973659
trace2:gvfs:experiment: traverse_trees
jeffhostetler Apr 30, 2019
3757858
trace2:gvfs:experiment: report_tracking
jeffhostetler Apr 30, 2019
72284e2
trace2:gvfs:experiment: read_cache: annotate thread usage in read-cache
jeffhostetler Jun 14, 2019
c57a07b
trace2:gvfs:experiment: read-cache: time read/write of cache-tree ext…
jeffhostetler Jul 9, 2019
b77de01
trace2:gvfs:experiment: add prime_cache_tree region
jeffhostetler Jun 3, 2019
adf3127
trace2:gvfs:experiment: add region to apply_virtualfilesystem()
jeffhostetler Jul 16, 2019
16a1faf
trace2:gvfs:experiment: add region around unpack_trees()
jeffhostetler Jul 16, 2019
304c14e
trace2:gvfs:experiment: add region to cache_tree_fully_valid()
jeffhostetler Jul 16, 2019
cc2047b
trace2:gvfs:experiment: add unpack_entry() counter to unpack_trees() …
jeffhostetler Jul 16, 2019
a82ad4f
trace2:gvfs:experiment: increase default event depth for unpack-tree …
jeffhostetler Jul 25, 2019
35413cb
merge-recursive: avoid confusing logic in was_dirty()
dscho May 21, 2019
14195c4
trace2:gvfs:experiment: add data for check_updates() in unpack_trees()
jeffhostetler Jul 25, 2019
720a07a
BRANCHES.md: Add explanation of branches and using forks
Jul 27, 2018
5bb9f62
merge-recursive: add some defensive coding to was_dirty()
dscho May 21, 2019
b4fa368
Trace2:gvfs:experiment: capture more 'tracking' details
jeffhostetler Jul 26, 2019
2bab82c
Merge pull request #98 Add explanation of branches and using forks
Dec 19, 2018
5efdc2b
merge-recursive: teach was_dirty() about the virtualfilesystem
dscho May 21, 2019
7c9df03
Merge branch 'vfs-trace2'
jeffhostetler Apr 23, 2019
ee729c1
status: deserialize with -uno does not print correct hint
jeffhostetler Jun 25, 2019
a00847b
Merge branch 'virtualfilesystem-and-merge-recursive'
dscho May 21, 2019
cd2a787
Merge pull request #157 from jeffhostetler/vfs-222-status-cache-untra…
jeffhostetler Jun 26, 2019
fd06941
backwards-compatibility: support the post-indexchanged hook
dscho May 28, 2019
f8b6c6d
Merge pull request #183: Revert 'git checkout -b' regression; warn ab…
derrickstolee Aug 21, 2019
7464a10
Merge pull request #188: upload-pack: fix race condition in error mes…
derrickstolee Aug 28, 2019
8b34a15
credential: set trace2_child_class for credential manager children
jeffhostetler Oct 3, 2019
b3be972
sub-process: do not borrow cmd pointer from caller
jeffhostetler Sep 18, 2019
2967d91
sub-process: add subprocess_start_argv()
jeffhostetler Sep 18, 2019
5563586
sha1-file: add function to update existing loose object cache
jeffhostetler Sep 24, 2019
79c1eda
packfile: add install_packed_git_and_mru()
jeffhostetler Sep 25, 2019
67adc16
index-pack: avoid immediate object fetch while parsing packfile
jeffhostetler Sep 24, 2019
1f41b15
gvfs-helper: create tool to fetch objects using the GVFS Protocol
jeffhostetler Aug 13, 2019
4d4a8e1
gvfs-helper: fix race condition when creating loose object dirs
derrickstolee Oct 4, 2019
b54ed3f
sha1-file: create shared-cache directory if it doesn't exist
jeffhostetler Oct 7, 2019
38fcee6
gvfs-helper-client: rename ghs__ symbols to gh_server__
jeffhostetler Oct 8, 2019
5237d68
gvfs-helper-client: rename ghs__chosen_odb to gh_client__chosen_odb f…
jeffhostetler Oct 8, 2019
bcc85ea
gvfs-helper-client: rename ghc__ symbols to gh_client__ for clarity
jeffhostetler Oct 8, 2019
fe54533
gvfs-helper: better handling of network errors
jeffhostetler Oct 8, 2019
6cad4c1
gvfs-helper-client: properly update loose cache with fetched OID
jeffhostetler Oct 8, 2019
5003eb2
gvfs-helper: V2 robust retry and throttling
jeffhostetler Oct 10, 2019
7719fc2
gvfs-helper: expose gvfs/objects GET and POST semantics
jeffhostetler Oct 21, 2019
d7b4a7d
gvfs-helper: dramatically reduce progress noise
derrickstolee Oct 24, 2019
0dc4f22
gvfs-helper: handle pack-file after single POST request
derrickstolee Nov 11, 2019
29ae8cd
gvfs-helper-client.h: define struct object_id
derrickstolee Nov 4, 2019
02ff6cb
Merge pull request #221: gvfs-helper: handle pack-file after single P…
derrickstolee Nov 12, 2019
3291a04
test-gvfs-prococol, t5799: tests for gvfs-helper
jeffhostetler Oct 25, 2019
b5b927e
t/helper/.gitignore: add test-gvfs-procotol
jeffhostetler Nov 13, 2019
c8e5989
gvfs-helper: move result-list construction into install functions
jeffhostetler Nov 13, 2019
3b1481d
t5799: add support for POST to return either a loose object or packfile
jeffhostetler Nov 13, 2019
80f9676
gvfs-helper: add prefetch support
jeffhostetler Nov 11, 2019
bfe1b52
fsmonitor: check CE_FSMONITOR_VALID in ce_uptodate
kewillford Nov 21, 2019
6553313
t5799: cleanup wc-l and grep-c lines
jeffhostetler Nov 13, 2019
f4ba34b
gvfs-helper: add prefetch .keep file for last packfile
jeffhostetler Nov 26, 2019
9279532
fsmonitor: add script for debugging and update script for tests
kewillford Nov 21, 2019
8713235
Merge pull request #220 from jeffhostetler/test-gvfs-helper-2.24
jeffhostetler Nov 14, 2019
11e55eb
gvfs-helper: do one read in my_copy_fd_len_tail()
derrickstolee Dec 16, 2019
3e81032
Merge pull request #212 fsmonitor updates for improved performance
kewillford Nov 21, 2019
9c1efca
gvfs-helper: move content-type warning for prefetch packs
derrickstolee Dec 16, 2019
79e9230
fetch: use gvfs-helper prefetch under config
derrickstolee Dec 17, 2019
d4e75af
Merge pull request #227: gvfs-helper: add prefetch action
derrickstolee Dec 17, 2019
0469f1d
gvfs-helper: better support for concurrent packfile fetches
jeffhostetler Dec 18, 2019
d4097de
Merge pull request #228: "gvfs-helper prefetch" during "git fetch"
derrickstolee Dec 17, 2019
94fa1d0
gvfs-helper: retry when creating temp files
derrickstolee Dec 26, 2019
32f5baf
Merge pull request #229 from jeffhostetler/gvfs-helper-lock-pack-dir
jeffhostetler Dec 20, 2019
3b9ff2a
Merge pull request #231: gvfs-helper: retry when creating temp files
derrickstolee Dec 31, 2019
0b9369d
remote-curl: do not call fetch-pack when using gvfs-helper
derrickstolee Feb 3, 2020
c861919
Revert "sparse-checkout: check for dirty status"
derrickstolee Jan 13, 2020
3c7066e
vfs: disable `git update-git-for-windows`
dscho Feb 4, 2020
a5a5174
Merge pull request #240: remote-https: do not call fetch-pack if usin…
derrickstolee Feb 4, 2020
e1d0adf
Merge pull request #243 from dscho/disable-update-gfw
dscho Feb 4, 2020
9934fcf
Merge branch 'ds/sparse-add' into vfs-2.25.1
derrickstolee Feb 21, 2020
397006e
diff: skip batch object download when possible
derrickstolee Jan 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
/git-gc
/git-get-tar-commit-id
/git-grep
/git-gvfs-helper
/git-hash-object
/git-help
/git-http-backend
Expand Down
53 changes: 53 additions & 0 deletions BRANCHES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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. master

This will track the Git for Windows repository master branch

2. vfs

Would like to use this branch as an ever-green branch that continually rebases the VFSForGit changes onto a windows ever-green branch that is on the core/master, so that we can detect when the patches for VFSForGit have issues or if we have a new version patches sent upstream git we can regenerate this branch.

3. vs/master

This tracks with the Git for Windows repository vs/master branch and are the generated files for using a Visual Studio solution.

4. 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.20.0
vfs-2.20.1
```

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.

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.

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 @@ -371,6 +371,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 @@ -68,6 +68,14 @@ core.fsmonitor::
avoiding unnecessary processing of files that have not changed.
See the "fsmonitor-watchman" section of linkgit:githooks[5].

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 @@ -611,6 +619,55 @@ core.multiPackIndex::
single index. See link:technical/multi-pack-index.html[the
multi-pack-index design document].

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
22 changes: 22 additions & 0 deletions Documentation/config/status.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,25 @@ status.submoduleSummary::
the --ignore-submodules=dirty command-line option or the 'git
submodule summary' command, which shows a similar output but does
not honor these settings.

status.deserializePath::
EXPERIMENTAL, Pathname to a file containing cached status results
generated by `--serialize`. This will be overridden by
`--deserialize=<path>` on the command line. If the cache file is
invalid or stale, git will fall-back and compute status normally.

status.deserializeWait::
EXPERIMENTAL, Specifies what `git status --deserialize` should do
if the serialization cache file is stale and whether it should
fall-back and compute status normally. This will be overridden by
`--deserialize-wait=<value>` on the command line.
+
--
* `fail` - cause git to exit with an error when the status cache file
is stale; this is intended for testing and debugging.
* `block` - cause git to spin and periodically retry the cache file
every 100 ms; this is intended to help coordinate with another git
instance concurrently computing the cache file.
* `no` - to immediately fall-back if cache file is stale. This is the default.
* `<timeout>` - time (in tenths of a second) to spin and retry.
--
26 changes: 22 additions & 4 deletions Documentation/git-sparse-checkout.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,21 @@ To avoid interfering with other worktrees, it first enables the
+
When the `--stdin` option is provided, the patterns are read from
standard in as a newline-delimited list instead of from the arguments.
+
When `core.sparseCheckoutCone` is enabled, the input list is considered a
list of directories instead of sparse-checkout patterns. The command writes
patterns to the sparse-checkout file to include all files contained in those
directories (recursively) as well as files that are siblings of ancestor
directories. The input format matches the output of `git ls-tree --name-only`.
This includes interpreting pathnames that begin with a double quote (") as
C-style quoted strings.

'add'::
Update the sparse-checkout file to include additional patterns.
By default, these patterns are read from the command-line arguments,
but they can be read from stdin using the `--stdin` option. When
`core.sparseCheckoutCone` is enabled, the given patterns are interpreted
as directory names as in the 'set' subcommand.

'disable'::
Disable the `core.sparseCheckout` config setting, and restore the
Expand Down Expand Up @@ -106,7 +121,7 @@ The full pattern set allows for arbitrary pattern matches and complicated
inclusion/exclusion rules. These can result in O(N*M) pattern matches when
updating the index, where N is the number of patterns and M is the number
of paths in the index. To combat this performance issue, a more restricted
pattern set is allowed when `core.spareCheckoutCone` is enabled.
pattern set is allowed when `core.sparseCheckoutCone` is enabled.

The accepted patterns in the cone pattern set are:

Expand All @@ -128,9 +143,12 @@ the following patterns:
----------------

This says "include everything in root, but nothing two levels below root."
If we then add the folder `A/B/C` as a recursive pattern, the folders `A` and
`A/B` are added as parent patterns. The resulting sparse-checkout file is
now

When in cone mode, the `git sparse-checkout set` subcommand takes a list of
directories instead of a list of sparse-checkout patterns. In this mode,
the command `git sparse-checkout set A/B/C` sets the directory `A/B/C` as
a recursive pattern, the directories `A` and `A/B` are added as parent
patterns. The resulting sparse-checkout file is now

----------------
/*
Expand Down
35 changes: 35 additions & 0 deletions Documentation/git-status.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,21 @@ ignored, then the directory is not shown, but all contents are shown.
update it afterwards if any changes were detected. Defaults to
`--lock-index`.

--serialize[=<path>]::
(EXPERIMENTAL) Serialize raw status results to a file or stdout
in a format suitable for use by `--deserialize`. If a path is
given, serialize data will be written to that path *and* normal
status output will be written to stdout. If path is omitted,
only binary serialization data will be written to stdout.

--deserialize[=<path>]::
(EXPERIMENTAL) Deserialize raw status results from a file or
stdin rather than scanning the worktree. If `<path>` is omitted
and `status.deserializePath` is unset, input is read from stdin.
--no-deserialize::
(EXPERIMENTAL) Disable implicit deserialization of status results
from the value of `status.deserializePath`.

<pathspec>...::
See the 'pathspec' entry in linkgit:gitglossary[7].

Expand Down Expand Up @@ -405,6 +420,26 @@ quoted as explained for the configuration variable `core.quotePath`
(see linkgit:git-config[1]).


SERIALIZATION and DESERIALIZATION (EXPERIMENTAL)
------------------------------------------------

The `--serialize` option allows git to cache the result of a
possibly time-consuming status scan to a binary file. A local
service/daemon watching file system events could use this to
periodically pre-compute a fresh status result.

Interactive users could then use `--deserialize` to simply
(and immediately) print the last-known-good result without
waiting for the status scan.

The binary serialization file format includes some worktree state
information allowing `--deserialize` to reject the cached data
and force a normal status scan if, for example, the commit, branch,
or status modes/options change. The format cannot, however, indicate
when the cached data is otherwise stale -- that coordination belongs
to the task driving the serializations.


CONFIGURATION
-------------

Expand Down
20 changes: 20 additions & 0 deletions Documentation/githooks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,26 @@ and "0" meaning they were not.
Only one parameter should be set to "1" when the hook runs. The hook
running passing "1", "1" should not be possible.

virtualFilesystem
~~~~~~~~~~~~~~~~~~

"Virtual File System" allows populating the working directory sparsely.
The projection data is typically automatically generated by an external
process. Git will limit what files it checks for changes as well as which
directories are checked for untracked files based on the path names given.
Git will also only update those files listed in the projection.

The hook is invoked when the configuration option core.virtualFilesystem
is set. It takes one argument, a version (currently 1).

The hook should output to stdout the list of all files in the working
directory that git should track. The paths are relative to the root
of the working directory and are separated by a single NUL. Full paths
('dir1/a.txt') as well as directories are supported (ie 'dir1/').

The exit status determines whether git will use the data from the
hook. On error, git will abort the command with an error message.

GIT
---
Part of the linkgit:git[1] suite
102 changes: 102 additions & 0 deletions Documentation/technical/read-object-protocol.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
Read Object Process
^^^^^^^^^^^^^^^^^^^^^^^^^^^

The read-object process enables Git to read all missing blobs with a
single process invocation for the entire life of a single Git command.
This is achieved by using a packet format (pkt-line, see technical/
protocol-common.txt) based protocol over standard input and standard
output as follows. All packets, except for the "*CONTENT" packets and
the "0000" flush packet, are considered text and therefore are
terminated by a LF.

Git starts the process when it encounters the first missing object that
needs to be retrieved. After the process is started, Git sends a welcome
message ("git-read-object-client"), a list of supported protocol version
numbers, and a flush packet. Git expects to read a welcome response
message ("git-read-object-server"), exactly one protocol version number
from the previously sent list, and a flush packet. All further
communication will be based on the selected version.

The remaining protocol description below documents "version=1". Please
note that "version=42" in the example below does not exist and is only
there to illustrate how the protocol would look with more than one
version.

After the version negotiation Git sends a list of all capabilities that
it supports and a flush packet. Git expects to read a list of desired
capabilities, which must be a subset of the supported capabilities list,
and a flush packet as response:
------------------------
packet: git> git-read-object-client
packet: git> version=1
packet: git> version=42
packet: git> 0000
packet: git< git-read-object-server
packet: git< version=1
packet: git< 0000
packet: git> capability=get
packet: git> capability=have
packet: git> capability=put
packet: git> capability=not-yet-invented
packet: git> 0000
packet: git< capability=get
packet: git< 0000
------------------------
The only supported capability in version 1 is "get".

Afterwards Git sends a list of "key=value" pairs terminated with a flush
packet. The list will contain at least the command (based on the
supported capabilities) and the sha1 of the object to retrieve. Please
note, that the process must not send any response before it received the
final flush packet.

When the process receives the "get" command, it should make the requested
object available in the git object store and then return success. Git will
then check the object store again and this time find it and proceed.
------------------------
packet: git> command=get
packet: git> sha1=0a214a649e1b3d5011e14a3dc227753f2bd2be05
packet: git> 0000
------------------------

The process is expected to respond with a list of "key=value" pairs
terminated with a flush packet. If the process does not experience
problems then the list must contain a "success" status.
------------------------
packet: git< status=success
packet: git< 0000
------------------------

In case the process cannot or does not want to process the content, it
is expected to respond with an "error" status.
------------------------
packet: git< status=error
packet: git< 0000
------------------------

In case the process cannot or does not want to process the content as
well as any future content for the lifetime of the Git process, then it
is expected to respond with an "abort" status at any point in the
protocol.
------------------------
packet: git< status=abort
packet: git< 0000
------------------------

Git neither stops nor restarts the process in case the "error"/"abort"
status is set.

If the process dies during the communication or does not adhere to the
protocol then Git will stop the process and restart it with the next
object that needs to be processed.

After the read-object process has processed an object it is expected to
wait for the next "key=value" list containing a command. Git will close
the command pipe on exit. The process is expected to detect EOF and exit
gracefully on its own. Git will wait until the process has stopped.

A long running read-object process demo implementation can be found in
`contrib/long-running-read-object/example.pl` located in the Git core
repository. If you develop your own long running process then the
`GIT_TRACE_PACKET` environment variables can be very helpful for
debugging (see linkgit:git[1]).
Loading