A fork of Git containing Microsoft-specific patches.
Перейти к файлу
Derrick Stolee 8318dea2d0 unpack-trees: enable fscache for sparse-checkout
When updating the skip-worktree bits in the index to align with new
values in a sparse-checkout file, Git scans the entire working
directory with lstat() calls. In a sparse-checkout, many of these
lstat() calls are for paths that do not exist.

Enable the fscache feature during this scan. Since enable_fscache()
calls nest, the disable_fscache() method decrements a counter and
would only clear the cache if that counter reaches zero.

In a local test of a repo with ~2.2 million paths, updating the index
with git read-tree -m -u HEAD with a sparse-checkout file containing
only /.gitattributes improved from 2-3 minutes to ~6 seconds.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2020-01-13 20:21:03 +01:00
.github .github: Add configuration for the Sentiment Bot 2020-01-09 12:27:30 +01:00
Documentation add infrastructure for read-only file system level caches 2020-01-13 20:20:58 +01:00
block-sha1
builtin fscache: fscache takes an initial size 2020-01-13 20:21:02 +01:00
ci ci: include the built-in `git add -i` in the `linux-gcc` job 2020-01-13 20:20:21 +01:00
compat fscache: teach fscache to use NtQueryDirectoryFile 2020-01-13 20:21:03 +01:00
contrib Merge branch 'dl/pretty-reference' 2019-12-10 13:11:43 -08:00
ewah
git-gui Merge branch 'git-gui-askyesno' 2020-01-09 12:28:38 +01:00
gitk-git gitk: Escape file paths before piping to git log 2020-01-13 20:20:24 +01:00
gitweb Merge branch 'do/gitweb-typofix-in-comments' 2020-01-08 12:44:11 -08:00
mergetools
negotiator
perl Fix spelling errors in documentation outside of Documentation/ 2019-11-07 13:42:00 +09:00
po l10n: zh_CN: for git v2.25.0 l10n round 1 2020-01-12 19:22:02 +08:00
ppc
refs Introduce helper to create symlinks that knows about index_state 2020-01-09 12:27:27 +01:00
sha1collisiondetection@855827c583
sha1dc Merge branch 'jk/lore-is-the-archive' 2019-12-06 15:09:23 -08:00
sha256
t fscache: add GIT_TEST_FSCACHE support 2020-01-13 20:21:01 +01:00
templates Merge branch 'kw/fsmonitor-watchman-fix' 2019-12-01 09:04:33 -08:00
trace2 Merge branch 'en/doc-typofix' 2019-12-01 09:04:35 -08:00
vcs-svn
xdiff Merge branch 'rs/xdiff-ignore-ws-w-func-context' 2019-12-16 13:08:32 -08:00
.cirrus.yml CI: add FreeBSD CI support via Cirrus-CI 2019-12-20 12:09:12 -08:00
.clang-format
.editorconfig
.gitattributes gitattributes: mark .png files as binary 2020-01-09 12:27:27 +01:00
.gitignore sparse-checkout: create builtin with 'list' subcommand 2019-11-22 16:11:43 +09:00
.gitmodules
.mailmap mailmap: mask accentless variant for Công Danh 2019-12-26 09:53:09 -08:00
.travis.yml
.tsan-suppressions
CODE_OF_CONDUCT.md Modify the Code of Conduct for Git for Windows 2020-01-09 12:27:29 +01:00
COPYING
GIT-VERSION-GEN Git 2.25 2020-01-13 10:16:43 -08:00
INSTALL Merge branch 'ar/install-doc-update-cmds-needing-the-shell' 2019-12-01 09:04:41 -08:00
LGPL-2.1
Makefile test-tool: learn to act as a drop-in replacement for `iconv` 2020-01-09 12:27:27 +01:00
README.md README.md: Add a Windows-specific preamble 2020-01-09 12:27:29 +01:00
RelNotes Git 2.24.1 2019-12-06 16:31:40 +01:00
abspath.c
aclocal.m4
add-interactive.c built-in add -p: respect the `interactive.singlekey` config setting 2020-01-13 20:20:21 +01:00
add-interactive.h built-in add -p: respect the `interactive.singlekey` config setting 2020-01-13 20:20:21 +01:00
add-patch.c built-in add -p: respect the `interactive.singlekey` config setting 2020-01-13 20:20:21 +01:00
advice.c submodule--helper: advise on fatal alternate error 2019-12-03 08:49:45 -08:00
advice.h submodule--helper: advise on fatal alternate error 2019-12-03 08:49:45 -08:00
alias.c
alias.h
alloc.c
alloc.h
apply.c Introduce helper to create symlinks that knows about index_state 2020-01-09 12:27:27 +01:00
apply.h
archive-tar.c archive: avoid spawning `gzip` 2020-01-13 20:20:19 +01:00
archive-zip.c Merge branch 'rs/archive-zip-code-cleanup' 2019-12-16 13:14:47 -08:00
archive.c
archive.h
argv-array.c argv-array: add space after `while` 2019-11-20 13:29:02 +09:00
argv-array.h argv-array: move doc to argv-array.h 2019-11-18 15:21:29 +09:00
attr.c attr: move doc to attr.h 2019-11-18 15:21:28 +09:00
attr.h attr: move doc to attr.h 2019-11-18 15:21:28 +09:00
azure-pipelines.yml
banned.h
base85.c
bisect.c
bisect.h
blame.c
blame.h
blob.c
blob.h
branch.c
branch.h
builtin.h sparse-checkout: create builtin with 'list' subcommand 2019-11-22 16:11:43 +09:00
bulk-checkin.c
bulk-checkin.h
bundle.c bundle-create: progress output control 2019-11-11 11:46:28 +09:00
bundle.h bundle-create: progress output control 2019-11-11 11:46:28 +09:00
cache-tree.c
cache-tree.h
cache.h clean: do not traverse mount points 2020-01-13 20:20:26 +01:00
chdir-notify.c
chdir-notify.h
check-builtins.sh
check_bindir
checkout.c
checkout.h
color.c
color.h
column.c
column.h
combine-diff.c
command-list.txt Merge branch 'ds/sparse-cone' 2019-12-25 11:21:58 -08:00
commit-graph.c Merge branch 'ds/commit-graph-set-size-mult' 2020-01-06 14:17:51 -08:00
commit-graph.h
commit-reach.c
commit-reach.h
commit-slab-decl.h
commit-slab-impl.h
commit-slab.h
commit.c Merge branch 'jk/cleanup-object-parsing-and-fsck' 2019-12-01 09:04:28 -08:00
commit.h legacy stash -p: respect the add.interactive.usebuiltin setting 2019-12-07 20:09:46 +01:00
common-main.c
config.c config: normalize the path of the system gitconfig 2020-01-13 20:20:28 +01:00
config.h
config.mak.dev
config.mak.in
config.mak.uname mingw: add a cache below mingw's lstat and dirent implementations 2020-01-13 20:20:58 +01:00
configure.ac Merge branch 'dd/sequencer-utf8' 2019-12-01 09:04:36 -08:00
connect.c Sync with 2.23.1 2019-12-06 16:31:39 +01:00
connect.h
connected.c clone: remove fetch_if_missing=0 2019-11-13 11:48:47 +09:00
connected.h
convert.c Merge branch 'rs/skip-iprefix' 2019-12-01 09:04:36 -08:00
convert.h
copy.c
credential-cache--daemon.c
credential-cache.c
credential-store.c mingw: ensure that core.longPaths is handled *always* 2020-01-09 12:27:25 +01:00
credential.c
credential.h credential: move doc to credential.h 2019-11-18 15:21:29 +09:00
csum-file.c
csum-file.h
ctype.c
daemon.c Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
date.c date.c: switch to reentrant {gm,local}time_r 2019-11-30 13:50:48 -08:00
decorate.c
decorate.h
delta-islands.c
delta-islands.h
delta.h
detect-compiler
diff-delta.c
diff-lib.c
diff-no-index.c
diff.c diff: export diffstat interface 2019-12-07 19:33:24 +01:00
diff.h Merge branch 'hw/doc-in-header' 2019-12-16 13:08:39 -08:00
diffcore-break.c
diffcore-delta.c
diffcore-order.c
diffcore-pickaxe.c
diffcore-rename.c diffcore-rename: speed up register_rename_src 2020-01-13 20:20:18 +01:00
diffcore.h diff: move doc to diff.h and diffcore.h 2019-11-18 15:21:28 +09:00
dir-iterator.c
dir-iterator.h
dir.c dir.c: regression fix for add_excludes with fscache 2020-01-13 20:20:59 +01:00
dir.h Merge branch 'ds/sparse-cone' 2019-12-25 11:21:58 -08:00
editor.c
entry.c checkout.c: enable fscache for checkout again 2020-01-13 20:21:00 +01:00
environment.c Merge branch 'ds/sparse-cone' 2019-12-25 11:21:58 -08:00
exec-cmd.c
exec-cmd.h
fast-import.c Sync with 2.23.1 2019-12-06 16:31:39 +01:00
fetch-negotiator.c
fetch-negotiator.h
fetch-pack.c fscache: fscache takes an initial size 2020-01-13 20:21:02 +01:00
fetch-pack.h
fmt-merge-msg.h
fsck.c Sync with Git 2.24.1 2019-12-09 22:17:55 -08:00
fsck.h
fsmonitor.c unpack-trees: skip stat on fsmonitor-valid files 2019-11-21 12:48:18 +09:00
fsmonitor.h
fuzz-commit-graph.c
fuzz-pack-headers.c
fuzz-pack-idx.c
generate-cmdlist.sh
gettext.c
gettext.h
git-add--interactive.perl Allow `add -p` and `add -i` with a large number of files 2020-01-09 12:27:22 +01:00
git-archimport.perl
git-bisect.sh
git-compat-util.h fscache: update fscache to be thread specific instead of global 2020-01-13 20:21:02 +01:00
git-cvsexportcommit.perl
git-cvsimport.perl Fix spelling errors in messages shown to users 2019-11-10 16:00:54 +09:00
git-cvsserver.perl
git-difftool--helper.sh
git-filter-branch.sh
git-instaweb.sh
git-legacy-stash.sh stash -p: (partially) fix bug concerning split hunks 2020-01-13 20:20:21 +01:00
git-merge-octopus.sh
git-merge-one-file.sh
git-merge-resolve.sh
git-mergetool--lib.sh
git-mergetool.sh
git-p4.py Merge branch 'bk/p4-misc-usability' 2020-01-02 12:38:29 -08:00
git-parse-remote.sh
git-quiltimport.sh
git-rebase--preserve-merges.sh
git-request-pull.sh
git-send-email.perl Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
git-sh-i18n.sh
git-sh-setup.sh mingw: only use Bash-ism `builtin pwd -W` when available 2020-01-09 12:27:28 +01:00
git-submodule.sh Merge branch 'dl/submodule-set-url' 2019-12-10 13:11:42 -08:00
git-svn.perl git svn: stop using `rebase --preserve-merges` 2019-11-23 09:49:23 +09:00
git-web--browse.sh
git.c sparse-checkout: create builtin with 'list' subcommand 2019-11-22 16:11:43 +09:00
git.rc
gpg-interface.c Unbreak interactive GPG prompt upon signing 2020-01-09 12:27:25 +01:00
gpg-interface.h gpg-interface: prefer check_signature() for GPG verification 2019-11-30 13:52:35 -08:00
graph.c graph: fix lack of color in horizontal lines 2020-01-08 09:37:18 -08:00
graph.h graph: move doc to graph.h and graph.c 2019-11-18 15:21:28 +09:00
grep.c grep: don't return an expression from pcre2_free() 2019-11-30 14:06:58 -08:00
grep.h
hash.h
hashmap.c Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
hashmap.h Merge branch 'en/doc-typofix' 2019-12-01 09:04:35 -08:00
help.c Fix spelling errors in messages shown to users 2019-11-10 16:00:54 +09:00
help.h
hex.c hex: drop sha1_to_hex() 2019-11-13 10:09:10 +09:00
http-backend.c mingw: ensure that core.longPaths is handled *always* 2020-01-09 12:27:25 +01:00
http-fetch.c
http-push.c
http-walker.c
http.c remote-curl: unbreak http.extraHeader with custom allocators 2019-12-06 21:56:50 +01:00
http.h
ident.c
imap-send.c
interdiff.c
interdiff.h
iterator.h
json-writer.c
json-writer.h
khash.h
kwset.c
kwset.h kset.h, tar.h: add missing header guard to prevent multiple inclusion 2019-11-07 20:12:04 +09:00
levenshtein.c
levenshtein.h
line-log.c
line-log.h
line-range.c
line-range.h
linear-assignment.c
linear-assignment.h
list-objects-filter-options.c
list-objects-filter-options.h
list-objects-filter.c
list-objects-filter.h
list-objects.c
list-objects.h
list.h
ll-merge.c
ll-merge.h merge: move doc to ll-merge.h 2019-11-18 15:21:28 +09:00
lockfile.c lockfile.c: use is_dir_sep() instead of hardcoded '/' checks 2020-01-09 12:27:26 +01:00
lockfile.h
log-tree.c Merge branch 'hi/gpg-use-check-signature' 2019-12-10 13:11:45 -08:00
log-tree.h
ls-refs.c
ls-refs.h
mailinfo.c
mailinfo.h
mailmap.c
mailmap.h
match-trees.c
mem-pool.c mem_pool: add GIT_TRACE_MEMPOOL support 2020-01-13 20:21:02 +01:00
mem-pool.h
merge-blobs.c
merge-blobs.h
merge-recursive.c Introduce helper to create symlinks that knows about index_state 2020-01-09 12:27:27 +01:00
merge-recursive.h
merge.c
mergesort.c
mergesort.h
midx.c
midx.h
name-hash.c Merge branch 'en/doc-typofix' 2019-12-01 09:04:35 -08:00
notes-cache.c
notes-cache.h
notes-merge.c
notes-merge.h
notes-utils.c
notes-utils.h
notes.c Merge branch 'dl/format-patch-notes-config-fixup' 2019-12-25 11:21:58 -08:00
notes.h Merge branch 'dl/format-patch-notes-config-fixup' 2019-12-25 11:21:58 -08:00
object-store.h packfile.c: speed up loading lots of packfiles 2019-12-03 07:59:45 -08:00
object.c packfile.c: speed up loading lots of packfiles 2019-12-03 07:59:45 -08:00
object.h
oidmap.c
oidmap.h
oidset.c
oidset.h
pack-bitmap-write.c
pack-bitmap.c
pack-bitmap.h
pack-check.c
pack-objects.c Merge branch 'jk/optim-in-pack-idx-conversion' 2019-12-01 09:04:38 -08:00
pack-objects.h Merge branch 'jk/optim-in-pack-idx-conversion' 2019-12-01 09:04:38 -08:00
pack-revindex.c
pack-revindex.h
pack-write.c
pack.h
packfile.c Merge branch 'ew/packfile-syscall-optim' 2020-01-06 14:17:50 -08:00
packfile.h
pager.c
parse-options-cb.c parse-options: avoid arithmetic on pointer that's potentially NULL 2019-11-13 11:44:00 +09:00
parse-options.c Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
parse-options.h Merge branch 'hw/doc-in-header' 2019-12-16 13:08:39 -08:00
patch-delta.c
patch-ids.c
patch-ids.h
path.c Merge branch 'dont-clean-junctions' 2020-01-13 20:20:45 +01:00
path.h
pathspec.c pathspec: add new function to parse file 2019-11-20 13:01:53 +09:00
pathspec.h Merge branch 'hw/doc-in-header' 2019-12-16 13:08:39 -08:00
pkt-line.c
pkt-line.h pkt-line: fix a typo 2019-12-02 08:48:56 -08:00
preload-index.c fscache: update fscache to be thread specific instead of global 2020-01-13 20:21:02 +01:00
pretty.c Merge branch 'dl/pretty-reference' 2019-12-10 13:11:43 -08:00
pretty.h
prio-queue.c
prio-queue.h
progress.c progress: create GIT_PROGRESS_DELAY 2019-11-27 10:57:10 +09:00
progress.h
promisor-remote.c promisor-remote: remove fetch_if_missing=0 2019-11-13 11:50:58 +09:00
promisor-remote.h
prompt.c
prompt.h
protocol.c
protocol.h
quote.c
quote.h
range-diff.c range-diff: mark pointers as const 2019-12-06 12:34:49 -08:00
range-diff.h Merge branch 'dl/range-diff-with-notes' 2019-12-16 13:08:46 -08:00
reachable.c
reachable.h
read-cache.c fscache: fscache takes an initial size 2020-01-13 20:21:02 +01:00
rebase-interactive.c
rebase-interactive.h
ref-filter.c
ref-filter.h
reflog-walk.c
reflog-walk.h
refs.c mingw: ensure that core.longPaths is handled *always* 2020-01-09 12:27:25 +01:00
refs.h refs: move doc to refs.h 2019-11-18 15:21:28 +09:00
refspec.c
refspec.h remote: move doc to remote.h and refspec.h 2019-11-18 15:21:28 +09:00
remote-curl.c
remote-testsvn.c
remote.c
remote.h remote: move doc to remote.h and refspec.h 2019-11-18 15:21:28 +09:00
replace-object.c
replace-object.h
repo-settings.c
repository.c Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
repository.h Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
rerere.c Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
rerere.h
resolve-undo.c
resolve-undo.h
revision.c Merge branch 'dl/format-patch-notes-config-fixup' 2019-12-25 11:21:58 -08:00
revision.h Merge branch 'dl/format-patch-notes-config-fixup' 2019-12-25 11:21:58 -08:00
run-command.c run-command: use prepare_git_cmd() in prepare_cmd() 2019-11-27 11:22:35 +09:00
run-command.h run-command: move doc to run-command.h 2019-11-18 15:21:29 +09:00
send-pack.c Config option to disable side-band-64k for transport 2020-01-13 20:20:28 +01:00
send-pack.h
sequencer.c Revert "Merge branch 'ra/rebase-i-more-options'" 2020-01-12 13:25:18 -08:00
sequencer.h Revert "Merge branch 'ra/rebase-i-more-options'" 2020-01-12 13:25:18 -08:00
serve.c
serve.h
server-info.c Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
setup.c
sh-i18n--envsubst.c
sha1-array.c sha1-array: move doc to sha1-array.h 2019-11-18 15:21:28 +09:00
sha1-array.h sha1-array: move doc to sha1-array.h 2019-11-18 15:21:28 +09:00
sha1-file.c
sha1-lookup.c
sha1-lookup.h
sha1-name.c
sha1dc_git.c hex: drop sha1_to_hex() 2019-11-13 10:09:10 +09:00
sha1dc_git.h
shallow.c
shell.c shell: use skip_prefix() instead of starts_with() 2019-11-27 11:18:24 +09:00
shortlog.h
sideband.c
sideband.h
sigchain.c
sigchain.h sigchain: move doc to sigchain.h 2019-11-18 15:21:29 +09:00
split-index.c
split-index.h
stable-qsort.c
strbuf.c strbuf_readlink: support link targets that exceed PATH_MAX 2020-01-09 12:27:26 +01:00
strbuf.h strbuf: add a helper function to call the editor "on an strbuf" 2019-12-13 12:37:14 -08:00
streaming.c
streaming.h
string-list.c
string-list.h Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
sub-process.c
sub-process.h
submodule-config.c fix-typo: consecutive-word duplications 2019-12-16 11:53:11 -08:00
submodule-config.h submodule-config: move doc to submodule-config.h 2019-11-18 15:21:29 +09:00
submodule.c Sync with 2.22.2 2019-12-06 16:31:30 +01:00
submodule.h Sync with 2.22.2 2019-12-06 16:31:30 +01:00
symlinks.c
tag.c
tag.h
tar.h kset.h, tar.h: add missing header guard to prevent multiple inclusion 2019-11-07 20:12:04 +09:00
tempfile.c
tempfile.h
thread-utils.c
thread-utils.h
tmp-objdir.c
tmp-objdir.h
trace.c
trace.h trace: move doc to trace.h 2019-11-18 15:21:29 +09:00
trace2.c
trace2.h trace2: move doc to trace2.h 2019-11-18 15:21:29 +09:00
trailer.c
trailer.h
transport-helper.c Always auto-gc after calling a fast-import transport 2020-01-13 20:20:17 +01:00
transport-internal.h
transport.c
transport.h
tree-diff.c
tree-walk.c Merge branch 'js/mingw-loosen-overstrict-tree-entry-checks' 2020-01-06 14:17:50 -08:00
tree-walk.h tree-walk: move doc to tree-walk.h 2019-11-18 15:21:29 +09:00
tree.c
tree.h
unicode-width.h
unimplemented.sh
unix-socket.c
unix-socket.h
unpack-trees.c unpack-trees: enable fscache for sparse-checkout 2020-01-13 20:21:03 +01:00
unpack-trees.h sparse-checkout: update working directory in-process 2019-11-22 16:11:44 +09:00
upload-pack.c
upload-pack.h
url.c Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
url.h
urlmatch.c
urlmatch.h
usage.c vreportf(): avoid relying on stdio buffering 2019-12-06 21:56:49 +01:00
userdiff.c Merge branch 'ln/userdiff-elixir' 2019-12-25 11:21:59 -08:00
userdiff.h
utf8.c utf8: use skip_iprefix() in same_utf_encoding() 2019-11-10 16:04:36 +09:00
utf8.h
varint.c
varint.h
version.c
version.h
versioncmp.c
walker.c
walker.h
wildmatch.c
wildmatch.h
worktree.c
worktree.h
wrap-for-bin.sh
wrapper.c
write-or-die.c
ws.c
wt-status.c
wt-status.h
xdiff-interface.c
xdiff-interface.h Fix spelling errors in code comments 2019-11-10 16:00:54 +09:00
zlib.c

README.md

Build Status

Git - fast, scalable, distributed revision control system

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.

Git is an Open Source project covered by the GNU General Public License version 2 (some parts of it are under different licenses, compatible with the GPLv2). It was originally written by Linus Torvalds with help of a group of hackers around the net.

Please read the file INSTALL for installation instructions.

Many Git online resources are accessible from https://git-scm.com/ including full documentation and Git related tools.

See Documentation/gittutorial.txt to get started, then see Documentation/giteveryday.txt for a useful minimum set of commands, and Documentation/git-<commandname>.txt for documentation of each command. If git has been correctly installed, then the tutorial can also be read with man gittutorial or git help tutorial, and the documentation of each command with man git-<commandname> or git help <commandname>.

CVS users may also want to read Documentation/gitcvs-migration.txt (man gitcvs-migration or git help cvs-migration if git is installed).

The user discussion and development of Git take place on the Git mailing list -- everyone is welcome to post bug reports, feature requests, comments and patches to git@vger.kernel.org (read Documentation/SubmittingPatches for instructions on patch submission). To subscribe to the list, send an email with just "subscribe git" in the body to majordomo@vger.kernel.org. The mailing list archives are available at https://lore.kernel.org/git/, http://marc.info/?l=git and other archival sites.

Issues which are security relevant should be disclosed privately to the Git Security mailing list git-security@googlegroups.com.

The maintainer frequently sends the "What's cooking" reports that list the current status of various development topics to the mailing list. The discussion following them give a good reference for project status, development direction and remaining tasks.

The name "git" was given by Linus Torvalds when he wrote the very first version. He described the tool as "the stupid content tracker" and the name as (depending on your mood):

  • random three-letter combination that is pronounceable, and not actually used by any common UNIX command. The fact that it is a mispronunciation of "get" may or may not be relevant.
  • stupid. contemptible and despicable. simple. Take your pick from the dictionary of slang.
  • "global information tracker": you're in a good mood, and it actually works for you. Angels sing, and a light suddenly fills the room.
  • "goddamn idiotic truckload of sh*t": when it breaks