Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
c7989fe
pager: fix order of atexit() calls
Nov 15, 2016
d18382f
reset --stdin: trim carriage return from the paths
Apr 5, 2017
4f86ed7
Merge 'gvfs-preamble' into HEAD
dscho Jun 11, 2018
962c486
gvfs: start by adding the -gvfs suffix to the version
sanoursa Jan 24, 2017
dbe47e5
sparse-checkout: update files with a modify/delete conflict
Feb 22, 2017
2f03132
sparse-checkout: avoid writing entries with the skip-worktree bit
Mar 1, 2017
f7203f8
Fix reset when using the sparse-checkout feature.
Mar 15, 2017
7f99db2
fsck: use ERROR_MULTI_PACK_INDEX
derrickstolee Sep 24, 2018
ca75317
gvfs: ensure that the version is based on a GVFS tag
dscho Apr 4, 2017
186c9da
gvfs: add a GVFS-specific header file
Jan 24, 2017
a6e94dd
gvfs: add the core.gvfs config setting
Jan 24, 2017
4ac26d8
gvfs: add the feature to skip writing the index' SHA-1
Jan 24, 2017
09be583
gvfs: add the feature that blobs may be missing
Jan 24, 2017
6a0e1ba
Add a new run_hook_argv() function
dscho Nov 30, 2016
ac7b245
gvfs: prevent files to be deleted outside the sparse checkout
May 18, 2016
940d6b0
gvfs: allow "virtualizing" objects
Jan 10, 2017
7b0b2e0
gvfs: optionally skip reachability checks/upload pack during fetch
May 30, 2016
ec72be5
Hydrate missing loose objects in check_and_freshen()
Mar 15, 2017
333e48f
gvfs: ensure all filters and EOL conversions are blocked
Jun 15, 2016
e2d9dad
gvfs: add global command pre and post hook procs
May 24, 2016
28d6fcf
Allow hooks to be run before setup_git_directory()
dscho Mar 6, 2017
88245cc
gvfs: introduce pre/post command hooks
Jan 24, 2017
ce8f580
Add support for read-object as a background process to retrieve missi…
Jul 18, 2017
c60a6f5
t0400: verify that the hook is called correctly from a subdirectory
dscho Mar 16, 2017
56d891c
sha1_file: when writing objects, skip the read_object_hook
dscho Sep 8, 2017
9dafe07
Pass PID of git process to hooks.
alepauly Apr 10, 2017
5c6d739
Merge 'read-object-hook' into HEAD
dscho Jun 11, 2018
5ef0cf2
pre-command: always respect core.hooksPath
dscho Aug 7, 2017
d9dd272
Merge 'pre-post-command-hooks' into HEAD
dscho Jun 11, 2018
bf4b74b
Merge 'sparse-checkout-fixes' into HEAD
dscho Jun 11, 2018
fee970c
Do not remove files outside the sparse-checkout
Apr 5, 2017
c84dffd
gvfs: refactor loading the core.gvfs config value
Apr 14, 2017
bba9922
status: add status serialization mechanism
jeffhostetler Aug 22, 2017
060001e
cache-tree: remove use of strbuf_addf in update_one
Jul 3, 2017
0814630
status: add status.aheadbehind setting
jeffhostetler Jan 9, 2018
d614310
Merge branch 'serialize_status_gvfs'
dscho Jun 11, 2018
5c2879f
Teach ahead-behind and serialized status to play nicely together
jamill Jan 10, 2018
2d89233
status: add warning when a/b calculation takes too long for long/norm…
jeffhostetler Jan 10, 2018
ed7391f
status: ignore status.aheadbehind in porcelain formats
jeffhostetler Feb 5, 2018
e0e928f
status: serialize to path
jeffhostetler Feb 2, 2018
9680d7f
status: reject deserialize in V2 and conflicts
jeffhostetler Feb 7, 2018
32d774f
fetch: Warn about forced updates after branch list
derrickstolee Feb 15, 2018
e6b90e1
fetch: Add --[no-]show-forced-updates argument
derrickstolee Feb 1, 2018
d43dec5
Merge branch 'ahead-behind-and-serialized-status'
dscho Jun 11, 2018
c452ae4
push: add --[no-]show-forced-updates passthrough to fetch
derrickstolee Feb 16, 2018
c6feda7
fetch: add documentation for --[no-]show-forced-updates
derrickstolee Feb 21, 2018
9f52fe4
Merge branch 'show-forced-updates'
dscho Jun 11, 2018
c2ea892
Add virtual file system settings and hook proc
benpeart Jan 11, 2018
48a26f5
Merge 'forced-updates-after-branch-list'
dscho Jun 11, 2018
df015a5
Update the virtualfilesystem support
benpeart Jun 7, 2018
ea9855f
Merge 'virtual-file-system-support'
dscho Jun 11, 2018
fa16bc0
commit: add generation to pop_most_recent_commit()
derrickstolee Jun 13, 2018
bbb9293
Merge 'update/virtual-file-system'
dscho Jun 11, 2018
2926617
Merge 'gvfs/ds/generation-numbers-update'
dscho Jun 11, 2018
52c31f5
status: fix rename reporting when using serialization cache
jeffhostetler Jul 25, 2018
8a9cfa1
status: add comments for ahead_behind_flags in serialization
jeffhostetler Jul 25, 2018
35fae6e
serialize-status: serialize global and repo-local exclude file metadata
jeffhostetler Jul 20, 2018
e669dbd
Merge pull request #6 from jeffhostetler/gvfs-serialize-status-rename
jeffhostetler Jul 26, 2018
b8a0906
status: deserialization wait
jeffhostetler Jul 25, 2018
aad187f
Merge pull request #1 from jeffhostetler/gvfs-serialize-exclude
jeffhostetler Jul 27, 2018
c6ed96e
virtualfilesystem: don't run the virtual file system hook if the inde…
benpeart Aug 1, 2018
4bf9218
Merge pull request #7 from jeffhostetler/gvfs-status-serialize-wait
jeffhostetler Jul 31, 2018
578ca43
virtualfilesystem: fix bug with symlinks being ignored
benpeart Sep 25, 2018
c208015
Merge pull request #15 from benpeart/difftool
benpeart Aug 20, 2018
d500192
Merge pull request #27 from benpeart/virtualprojectionlinks
benpeart Sep 26, 2018
769724e
trace2: create new combined trace facility
jeffhostetler Aug 30, 2018
a9f708e
trace2: add trace2 tracing of major regions in wt-status
jeffhostetler Aug 30, 2018
e45bc60
trace2: classify some child processes
jeffhostetler Aug 30, 2018
f142a15
trace2: add child classification for transport processes
jeffhostetler Oct 10, 2018
3af982f
trace2: instrument reading and writing the index
jeffhostetler Aug 30, 2018
99ada13
gvfs:trace2: add region/data events for status deserialization
jeffhostetler Sep 26, 2018
f10c0d7
virtualfilesystem: check if directory is included
Oct 9, 2018
3a564fa
gvfs:trace2: add trace2 tracing around read_object_process
jeffhostetler Sep 26, 2018
b0c591a
Merge pull request #33 virtualfilesystem - check if directory is incl…
Oct 10, 2018
d8b6284
pack-objects: add trace2 regions
derrickstolee Oct 9, 2018
68fb1f2
Merge pull request #28 from jeffhostetler/gvfs-trace2-v1
jeffhostetler Oct 10, 2018
cf4c1ae
Merge pull request #34 Add Trace2 regions to 'pack-objects'
derrickstolee Oct 11, 2018
7709e5e
rebase/stash: make post-command hook work again
dscho Oct 12, 2018
f7f0dbc
read-cache: add post-indexchanged hook
benpeart Mar 16, 2018
6f11ade
read-cache: post-indexchanged hook add skip-worktree bit changing sup…
benpeart Mar 19, 2018
77eefa1
Merge pull request #36 Avoid `sane_execvp` in `git rebase` and `git s…
derrickstolee Oct 12, 2018
984275e
read-cache: add test for post-indexchanged hook
benpeart Mar 19, 2018
4e8852f
send-pack: do not check for sha1 file when GVFS_MISSING_OK set
Nov 16, 2018
c5b4b4c
Merge pull request #24 Match multi-pack-index feature from upstream
dscho Oct 18, 2018
886eddb
Add documentation for the post-indexchanged hook
Oct 30, 2018
09e3b51
Merge pull request #68 send-pack do not check for sha1 file when GVFS…
Nov 27, 2018
d5866d6
vfs: fix case where directories not handled correctly
jamill Nov 20, 2018
376b902
Merge pull request #64 Index changed hook
Nov 29, 2018
db2e92b
Merge pull request #70 from jamill/jamill/virtual_filesystem_directories
jamill Dec 5, 2018
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
50 changes: 50 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[6].

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 @@ -600,6 +608,48 @@ 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.
--

core.sparseCheckout::
Enable "sparse checkout" feature. See section "Sparse checkout" in
linkgit:git-read-tree[1] for more information.
Expand Down
27 changes: 27 additions & 0 deletions Documentation/config/status.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ status.branch::
Set to true to enable --branch by default in linkgit:git-status[1].
The option --no-branch takes precedence over this variable.

status.aheadBehind::
EXPERIMENTAL, Set to true to enable --ahead-behind and false to
enable --no-ahead-behind by default in linkgit:git-status[1] for
non-porcelain status formats. Defaults to true.

status.displayCommentPrefix::
If set to true, linkgit:git-status[1] will insert a comment
prefix before each output line (starting with
Expand Down Expand Up @@ -70,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.
--
13 changes: 13 additions & 0 deletions Documentation/fetch-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,19 @@ endif::git-pull[]
When multiple `--server-option=<option>` are given, they are all
sent to the other side in the order listed on the command line.

--show-forced-updates::
By default, git checks if a branch is force-updated during
fetch. This can be disabled through fetch.showForcedUpdates, but
the --show-forced-updates option guarantees this check occurs.
See linkgit:git-config[1].

--no-show-forced-updates::
By default, git checks if a branch is force-updated during
fetch. Pass --no-show-forced-updates or set fetch.showForcedUpdates
to false to skip this check for performance reasons. If used during
'git-pull' the --ff-only option will still check for forced updates
before attempting a fast-forward update. See linkgit:git-config[1].

-4::
--ipv4::
Use IPv4 addresses only, ignoring IPv6 addresses.
Expand Down
35 changes: 35 additions & 0 deletions Documentation/git-status.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,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 @@ -389,6 +404,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
38 changes: 38 additions & 0 deletions Documentation/githooks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,44 @@ This hook is invoked by `git-p4 submit`. It takes no parameters and nothing
from standard input. Exiting with non-zero status from this script prevent
`git-p4 submit` from launching. Run `git-p4 submit --help` for details.

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.

post-indexchanged
~~~~~~~~~~~~~~~~~

This hook is invoked when the index is written in read-cache.c
do_write_locked_index.

The first parameter passed to the hook is the indicator for the
working directory being updated. "1" meaning working directory
was updated or "0" when the working directory was not updated.

The second parameter passed to the hook is the indicator for whether
or not the index was updated and the skip-worktree bit could have
changed. "1" meaning skip-worktree bits could have been updated
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.

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