Skip to content
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

Rebase to v2.36.0-rc2 #3785

Merged
merged 349 commits into from
Apr 18, 2022
Merged

Rebase to v2.36.0-rc2 #3785

merged 349 commits into from
Apr 18, 2022

Conversation

vdye
Copy link

@vdye vdye commented Apr 12, 2022

Changes since approval

Changes

This was a bit of a weird one, since I needed to deal with the merge of v2.35.2.windows.1. That merge introduced a bunch of duplicate commits, so for this rebase I:

I'm happy to move either or both to "ready-for-upstream" as needed (although, at least one of them will ideally make it into upstream v2.36.0, so it may not be worth the effort?).

Otherwise, the fixup from #3783 was squashed into the appropriate commit.

Diff vs main

Because of how the v2.35.2 merge was rebased, the range diff shows a bunch of duplicate "deleted" commits. The simple diff, on the other hand, gives us a clear picture of what actually changed upstream:

  • Added a note about the CVE fix
  • Updated the version
  • Changes from 5da9560 (submodule-helper: fix usage string, 2022-04-06)
  • Changes from af15f84 (i18n: fix some badly formatted i18n strings, 2022-04-11)
diff --git a/Documentation/RelNotes/2.36.0.txt b/Documentation/RelNotes/2.36.0.txt
index 8da5b2e1e7..d61ade21e2 100644
--- a/Documentation/RelNotes/2.36.0.txt
+++ b/Documentation/RelNotes/2.36.0.txt
@@ -397,6 +397,8 @@ Fixes since v2.35
    entry it moved.
    (merge b7f9130a06 vd/mv-refresh-stat later to maint).
 
+ * Fix for CVE-2022-24765 has been merged up from 2.35.2 and others.
+
  * Other code cleanup, docfix, build fix, etc.
    (merge cfc5cf428b jc/find-header later to maint).
    (merge 40e7cfdd46 jh/p4-fix-use-of-process-error-exception later to maint).
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 1c5f645167..9252e0430d 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=GIT-VERSION-FILE
-DEF_VER=v2.36.0-rc1
+DEF_VER=v2.36.0-rc2
 
 LF='
 '
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index ae972b4345..62215538cb 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -3082,7 +3082,7 @@ static int module_create_branch(int argc, const char **argv, const char *prefix)
 		OPT_END()
 	};
 	const char *const usage[] = {
-		N_("git submodule--helper create-branch [-f|--force] [--create-reflog] [-q|--quiet] [-t|--track] [-n|--dry-run] <name> <start_oid> <start_name>"),
+		N_("git submodule--helper create-branch [-f|--force] [--create-reflog] [-q|--quiet] [-t|--track] [-n|--dry-run] <name> <start-oid> <start-name>"),
 		NULL
 	};
 
diff --git a/git-send-email.perl b/git-send-email.perl
index a98460bdb9..5861e99a6e 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -2096,10 +2096,9 @@ sub validate_patch {
 			chdir($cwd_save) or die("chdir: $!");
 		}
 		if ($hook_error) {
-			$hook_error = sprintf(__("fatal: %s: rejected by %s hook\n" .
-						 $hook_error . "\n" .
-						 "warning: no patches were sent\n"),
-					      $fn, $hook_name);
+			$hook_error = sprintf(
+			    __("fatal: %s: rejected by %s hook\n%s\nwarning: no patches were sent\n"),
+			    $fn, $hook_name, $hook_error);
 			die $hook_error;
 		}
 	}

Range-diff

Included for reference, but it's cluttered with "fake" removed commits.

-  1:  898225ba04 (upstream: 898225ba04) <   -:  ---------- GIT-VERSION-GEN: bump to v2.33.1
-  2:  6e7ad1e4c2 (upstream: 6e7ad1e4c2) <   -:  ---------- mingw: avoid fallback for {local,gm}time_r()
-  3:  bdc77d1d68 (upstream: bdc77d1d68) <   -:  ---------- Add a function to determine whether a path is owned by the current user
-  4:  8959555cee (upstream: 8959555cee) <   -:  ---------- setup_git_directory(): add an owner check for the top-level directory
-  5:  fdcad5a53e (upstream: fdcad5a53e) <   -:  ---------- Fix `GIT_CEILING_DIRECTORIES` with `C:\` and the likes
-  6:  cb95038137 (upstream: cb95038137) <   -:  ---------- Git 2.30.3
-  7:  44de39c45c (upstream: 44de39c45c) <   -:  ---------- Git 2.31.2
-  8:  9bcd7a8eca (upstream: 9bcd7a8eca) <   -:  ---------- Git 2.32.1
-  9:  87ed4fc046 (upstream: 87ed4fc046) <   -:  ---------- Git 2.33.2
- 10:  4d0b43aa76 (upstream: 4d0b43aa76) <   -:  ---------- Git 2.34.2
- 11:  53ef17d3ee (upstream: 53ef17d3ee) <   -:  ---------- Git 2.35.2
- 12:  6c01dbf1cd <   -:  ---------- t9350: point out that refs are not updated correctly
- 13:  4e1ef7321d <   -:  ---------- transport-helper: add trailing --
- 14:  acc9d1546f <   -:  ---------- remote-helper: check helper status after import/export
- 15:  1be19e4ae2 <   -:  ---------- mingw: demonstrate a problem with certain absolute paths
- 16:  fe51ac0367 <   -:  ---------- Always auto-gc after calling a fast-import transport
- 17:  716787fffd <   -:  ---------- mingw: allow absolute paths without drive prefix
- 18:  5510995ce8 <   -:  ---------- archive: replace write_or_die() calls with write_block_or_die()
- 19:  c7f6bd03f9 <   -:  ---------- gitk: prevent overly long command lines
- 20:  353ece8c9b <   -:  ---------- clean: do not traverse mount points
- 21:  f888a012b4 <   -:  ---------- archive: avoid spawning `gzip`
- 22:  3b26122eb5 <   -:  ---------- mingw: change core.fsyncObjectFiles = 1 by default
- 23:  2d1d9054a5 <   -:  ---------- gitk: Escape file paths before piping to git log
- 24:  afade6e477 <   -:  ---------- clean: remove mount points when possible
- 25:  2c9993dbe9 <   -:  ---------- mingw: demonstrate a `git add` issue with NTFS junctions
- 26:  d5d8c90250 <   -:  ---------- mingw: include the Python parts in the build
 291:  6b5b75223a =   1:  d994e15310 t9350: point out that refs are not updated correctly
 294:  209fd820e4 =   2:  836fe72b27 transport-helper: add trailing --
 295:  35965b017e =   3:  7c40254062 mingw: demonstrate a `git add` issue with NTFS junctions
 298:  5ec2769e7d =   4:  ac1b6dbcd7 remote-helper: check helper status after import/export
 299:  14a352f266 =   5:  6d994a0c0f mingw: demonstrate a problem with certain absolute paths
 300:  529d0faa97 =   6:  cfa0ed70cb archive: replace write_or_die() calls with write_block_or_die()
 301:  f312ce91da =   7:  c83d352d9c gitk: prevent overly long command lines
 302:  80592d8ec9 =   8:  43a109486b clean: do not traverse mount points
 303:  9607b0234f =   9:  12da37a62a strbuf_realpath(): use platform-dependent API if available
 307:  2b0721dc59 =  10:  41c0d89691 Always auto-gc after calling a fast-import transport
 308:  cfecd6f2c3 =  11:  cc5191c26d mingw: allow absolute paths without drive prefix
 309:  9aca1970e5 =  12:  1f12a1c1da archive: avoid spawning `gzip`
 310:  7edf191872 =  13:  52659dd330 mingw: change core.fsyncObjectFiles = 1 by default
 311:  cb61da5546 =  14:  7f65d58957 gitk: Escape file paths before piping to git log
 312:  32335244d9 =  15:  3fcf02825c clean: remove mount points when possible
 313:  e50a845aef =  16:  d8578961e3 mingw: include the Python parts in the build
  27:  9ac589cb54 =  17:  170f5136e7 Config option to disable side-band-64k for transport
- 28:  65515cdcf1 <   -:  ---------- mingw: make sure `errno` is set correctly when socket operations fail
- 29:  4dc31d0a2a <   -:  ---------- mingw: do resolve symlinks in `getcwd()`
- 30:  e83411a26a <   -:  ---------- mingw: fix fatal error working on mapped network drives on Windows
- 31:  21993a4b79 <   -:  ---------- clink.pl: fix MSVC compile script to handle libcurl-d.lib
 315:  4e4c8e77a9 =  18:  c7ed0b0be9 mingw: make sure `errno` is set correctly when socket operations fail
 316:  8c2dd0cc4c =  19:  6546137ae5 mingw: do resolve symlinks in `getcwd()`
 317:  ee85d82c74 =  20:  fb652c5287 mingw: fix fatal error working on mapped network drives on Windows
 318:  d0ea68456b =  21:  a86423b4ae clink.pl: fix MSVC compile script to handle libcurl-d.lib
 292:  8cc1b561ba =  22:  33aeaa5207 vcxproj: unclash project directories with build outputs
  32:  f6f121844d =  23:  2ab3ae7cc1 mingw: ensure valid CTYPE
- 33:  641bf1202c <   -:  ---------- mingw: allow `git.exe` to be used instead of the "Git wrapper"
- 34:  0d7a4aa7b9 <   -:  ---------- strbuf_realpath(): use platform-dependent API if available
- 35:  47382c6926 <   -:  ---------- mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
- 36:  af4027a511 <   -:  ---------- http: use new "best effort" strategy for Secure Channel revoke checking
- 37:  d9cddcb40e <   -:  ---------- mingw: implement a platform-specific `strbuf_realpath()`
- 38:  b9172fe048 <   -:  ---------- vcxproj: unclash project directories with build outputs
- 39:  7188dd443a <   -:  ---------- t5505/t5516: allow running without `.git/branches/` in the templates
- 40:  05fe675f3c <   -:  ---------- Allow `add -p` and `add -i` with a large number of files
- 41:  5fb21e0886 <   -:  ---------- t5505/t5516: fix white-space around redirectors
- 42:  d118041c58 <   -:  ---------- t3701: verify that we can add *lots* of files interactively
- 43:  fbe6f5e16b <   -:  ---------- git add -i: handle CR/LF line endings in the interactive input
- 44:  c89595ff23 <   -:  ---------- commit: accept "scissors" with CR/LF line endings
- 45:  d146be9af8 <   -:  ---------- t0014: fix indentation
- 46:  0f6c6595ad <   -:  ---------- clink.pl: fix libexpatd.lib link error when using MSVC
- 47:  6bf17a6d42 <   -:  ---------- Makefile: clean up .ilk files when MSVC=1
- 48:  95834930de <   -:  ---------- vcbuild: add support for compiling Windows resource files
- 49:  56783bfcb2 <   -:  ---------- config.mak.uname: add git.rc to MSVC builds
- 50:  f10d937e74 <   -:  ---------- clink.pl: ignore no-stack-protector arg on MSVC=1 builds
- 51:  1653bb729c <   -:  ---------- clink.pl: move default linker options for MSVC=1 builds
- 52:  405295ce64 <   -:  ---------- git-gui: accommodate for intent-to-add files
- 53:  2fb3cfca20 <   -:  ---------- buildsystems: remove duplicate clause
- 54:  003e1c687f <   -:  ---------- vcxproj: handle resource files, too
- 55:  56bd805549 <   -:  ---------- vcpkg_install: detect lack of Git
- 56:  a547c677a7 <   -:  ---------- vcxproj: ignore -fno-stack-protector and -fno-common
- 57:  204acc1920 <   -:  ---------- vcpkg_install: add comment regarding slow network connections
- 58:  c8dcd23ebd <   -:  ---------- vcxproj: handle GUI programs, too
- 59:  35a0b03f32 <   -:  ---------- vcxproj: support building Windows/ARM64 binaries
- 60:  be32251de0 <   -:  ---------- win32: add a helper to run `git.exe` without a foreground window
- 61:  77aaf7d470 <   -:  ---------- vcbuild: install ARM64 dependencies when building ARM64 binaries
- 62:  f57c4e7a3f <   -:  ---------- git maintenance: avoid console window in scheduled tasks on Windows
- 63:  58b586e741 <   -:  ---------- Add a GitHub workflow to generate Git for Windows' Pacman package
- 64:  49499030f5 <   -:  ---------- git-artifacts: if GPG secrets are available, use them
- 65:  06622cddfa <   -:  ---------- git-artifacts: also code-sign, if configured via the secrets
- 66:  aae610d8bf <   -:  ---------- vcbuild: add an option to install individual 'features'
- 67:  f13d54c257 <   -:  ---------- git-artifacts: also build the installer
- 68:  5ab47a8d74 <   -:  ---------- cmake: allow building for Windows/ARM64
- 69:  14ebd69d49 <   -:  ---------- git-artifacts: also build portable, mingit and mingit-busybox
- 70:  6588e64795 <   -:  ---------- ci(vs-build) also build Windows/ARM64 artifacts
- 71:  f90ee89d7a <   -:  ---------- git-artifacts: also build 32-bit versions
- 72:  f7e36b6f6e <   -:  ---------- Add schannel to curl installation
- 73:  2212cf40b8 <   -:  ---------- git-artifacts: also build the nuget package
- 74:  cd0d79f863 <   -:  ---------- git-artifacts: allow restricting which artifacts are built
- 75:  daa1059c79 <   -:  ---------- git-artifacts: allow specifying repo/ref via workflow_dispatch
- 76:  d024619516 <   -:  ---------- git-artifacts: cache the build-installers artifact
- 77:  a13d686113 <   -:  ---------- git-artifacts: use the cached build-installers instead of makepkg-git
- 78:  51363785fa <   -:  ---------- git-artifacts: add ARM64 artifacts
- 79:  0c64d77909 <   -:  ---------- git-artifacts(arm64): avoid hard-linking the dashed built-ins
- 80:  3b6e163396 <   -:  ---------- git-artifacts: use a narrower `PATH`
- 81:  b3a8c3fdf9 <   -:  ---------- git-artifacts: fix BUILD_ONLY handling for ARM64
- 82:  55ac8747ce <   -:  ---------- git-artifacts: extend the `SKIP` logic to handle `pkg` and `build-arm64`
- 83:  3d34c4cca9 <   -:  ---------- git-artifacts: add workaround for GCM Core on ARM64
- 84:  0596313343 <   -:  ---------- git-artifacts: mark all inputs as "not required"
- 85:  42be9beaa2 <   -:  ---------- git-artifacts(build-arm64): build artifacts using the intended Git revision
- 86:  b47609a34b <   -:  ---------- cmake(): allow setting HOST_CPU for cross-compilation
- 87:  fac4671bde <   -:  ---------- git-artifacts: Use the shiny new setup-git-for-windows-sdk Action
- 88:  2f8fd745ed <   -:  ---------- ci(): add HOST_CPU to CMake command
- 89:  0b259a0af1 <   -:  ---------- CMake: default Visual Studio generator has changed
- 90:  ffdbad5f6a <   -:  ---------- subtree: update `contrib/subtree` `test` target
- 91:  aaaff54b10 <   -:  ---------- .gitignore: add Visual Studio CMakeSetting.json file
- 92:  dd9a3b755e <   -:  ---------- ci(vs-build): download the vcpkg artifacts using a dedicated Action
- 93:  a2cb562bbb <   -:  ---------- mingw: allow for longer paths in `parse_interpreter()`
- 94:  f1e641fde6 <   -:  ---------- compat/vcbuild: document preferred way to build in Visual Studio
- 95:  dbbec1d255 <   -:  ---------- http: optionally send SSL client certificate
- 96:  271b7596f0 <   -:  ---------- ci: run `contrib/subtree` tests in CI builds
- 97:  2525ca44e2 <   -:  ---------- fsmonitor: enhance existing comments
- 98:  3d2b6a957a <   -:  ---------- fsmonitor-ipc: create client routines for git-fsmonitor--daemon
- 99:  be8f91fe2e <   -:  ---------- fsmonitor: config settings are repository-specific
-100:  e41d6abb27 <   -:  ---------- fsmonitor: use IPC to query the builtin FSMonitor daemon
-101:  d10de77be6 <   -:  ---------- CMakeLists: add default "x64-windows" arch for Visual Studio
-102:  9f29499293 <   -:  ---------- fsmonitor: update fsmonitor config documentation
-103:  41bb549b8a <   -:  ---------- CMake: show Win32 and Generator_platform build-option values
-104:  4a6322695b <   -:  ---------- init: do parse _all_ core.* settings early
-105:  feac646ce8 <   -:  ---------- fsmonitor--daemon: man page
-106:  7f82336075 <   -:  ---------- fsmonitor--daemon: add a built-in fsmonitor daemon
-107:  176b56f366 <   -:  ---------- builtin/fsmonitor--daemon: use parse-options API fully
-108:  9502077e12 <   -:  ---------- fsmonitor--daemon: implement 'stop' and 'status' commands
-109:  6f6425b9bd <   -:  ---------- compat/fsmonitor/fsm-listen-win32: stub in backend for Windows
-110:  4544e6c7ef <   -:  ---------- compat/fsmonitor/fsm-listen-darwin: stub in backend for Darwin
-111:  e17e8aab0e <   -:  ---------- fsmonitor--daemon: implement 'run' command
-112:  aebf5a82af <   -:  ---------- fsmonitor--daemon: implement 'start' command
-113:  c1090d96e2 <   -:  ---------- fsmonitor--daemon: add pathname classification
-114:  ef6dede1fa <   -:  ---------- fsmonitor--daemon: define token-ids
-115:  4ff0d5fbba <   -:  ---------- fsmonitor--daemon: create token-based changed path cache
-116:  15a5e5c6c7 <   -:  ---------- compat/fsmonitor/fsm-listen-win32: implement FSMonitor backend on Windows
-117:  d43eccb65d <   -:  ---------- compat/fsmonitor/fsm-listen-darwin: add macos header files for FSEvent
-118:  e06addb47c <   -:  ---------- compat/fsmonitor/fsm-listen-darwin: implement FSEvent listener on MacOS
-119:  27c66da9f9 <   -:  ---------- fsmonitor--daemon: implement handle_client callback
-120:  f73d658c0b <   -:  ---------- help: include fsmonitor--daemon feature flag in version info
-121:  25ca4f7ef7 <   -:  ---------- t/helper/fsmonitor-client: create IPC client to talk to FSMonitor Daemon
-122:  4507377804 <   -:  ---------- t7527: create test for fsmonitor--daemon
-123:  c6d204cfcb <   -:  ---------- t/perf: avoid copying builtin fsmonitor files into test repo
-124:  4957dc6737 <   -:  ---------- t/helper/test-chmtime: skip directories on Windows
-125:  d198e3cb89 <   -:  ---------- t/perf/p7519: speed up test on Windows
-126:  a552d57029 <   -:  ---------- t/perf/p7519: add fsmonitor--daemon test cases
-127:  531e3eef6a <   -:  ---------- fsmonitor--daemon: periodically truncate list of modified files
-128:  be747cb3db <   -:  ---------- fsmonitor--daemon: use a cookie file to sync with file system
-129:  24678317f6 <   -:  ---------- fsmonitor: force update index after large responses
-130:  82142e2717 <   -:  ---------- t7527: test status with untracked-cache and fsmonitor--daemon
-131:  356dfab5f1 <   -:  ---------- compat/fsmonitor/fsm-listen-win32: handle shortnames
-132:  eab78bd65a <   -:  ---------- t7527: test FS event reporing on MacOS WRT case and Unicode
-133:  20a2a0b7bd <   -:  ---------- t7527: test builtin FSMonitor watching repos with unicode paths
-134:  b03de4361c <   -:  ---------- t/helper/fsmonitor-client: create stress test
-135:  5d3d5d1d23 <   -:  ---------- fsmonitor-settings: bare repos are incompatible with FSMonitor
-136:  8aaf11436c <   -:  ---------- fsmonitor-settings: stub in platform-specific incompatibility checking
-137:  33bf075d9c <   -:  ---------- fsmonitor-settings: virtual repos are incompatible with FSMonitor
-138:  6dfdb8989c <   -:  ---------- fsmonitor-settings: stub in platform-specific incompatibility checking on MacOS
-139:  dc0077ecc0 <   -:  ---------- fsmonitor-settings: remote repos on MacOS are incompatible with FSMonitor
-140:  9fd42ed664 <   -:  ---------- fsmonitor-settings: remote repos on Windows are incompatible with FSMonitor
-141:  e899094388 <   -:  ---------- unpack-trees: initialize fsmonitor_has_run_once in o->result
-142:  3ec61f19db <   -:  ---------- compat/fsmonitor/fsm-listen-darwin: ignore FSEvents caused by xattr changes on MacOS
-143:  a1a09064c2 <   -:  ---------- fsmonitor--daemon: print start message only if fsmonitor.announceStartup
-144:  19306fdd56 <   -:  ---------- fsmonitor--daemon: cd out of worktree root
-145:  46a74e9073 <   -:  ---------- fsmonitor--daemon: prepare for adding health thread
-146:  8e530cb796 <   -:  ---------- fsmonitor--daemon: rename listener thread related variables
-147:  caadaf0a44 <   -:  ---------- fsmonitor--daemon: stub in health thread
-148:  3d607cfc23 <   -:  ---------- compat/fsmonitor/fsm-health-win32: add framework for periodically monitoring
-149:  5459567fa8 <   -:  ---------- compat/fsmonitor/fsm-health-win32: force shutdown daemon if worktree root moves
-150:  ceca6851ba <   -:  ---------- compat/fsmonitor/fsm-listen-darwin: shutdown daemon if worktree root is moved/renamed
-151:  c1ef57913b <   -:  ---------- fsmonitor: measure time taken to apply fsmonitor query result
-152:  db0a50b576 <   -:  ---------- fsmonitor: optimize processing of directory events
-153:  9792fb4cb1 <   -:  ---------- t7527: FSMonitor tests for directory moves
-154:  f9202c5d28 <   -:  ---------- hash-object: demonstrate a >4GB/LLP64 problem
-155:  e208ef3b6a <   -:  ---------- hash_object_file_literally(): use size_t
-156:  f386ffc56c <   -:  ---------- object-file.c: use size_t for header lengths
-157:  8f64282913 <   -:  ---------- hash algorithms: use size_t for section lengths
-158:  e93aab3101 <   -:  ---------- fsmonitor: mark the built-in FSMonitor as experimental
-159:  554ad10261 <   -:  ---------- hash-object --stdin: verify that it works with >4GB/LLP64
-160:  e94dd472c1 <   -:  ---------- Enable the built-in FSMonitor as an experimental feature
-161:  40027206ea <   -:  ---------- hash-object: add another >4GB/LLP64 test case
-162:  16ce7fc3e1 <   -:  ---------- hash-object: add a >4GB/LLP64 test case using filtered input
-163:  f1c4cddf33 <   -:  ---------- Win32: make FILETIME conversion functions public
-164:  8b1619163d <   -:  ---------- Win32: dirent.c: Move opendir down
-165:  d66742ab84 <   -:  ---------- mingw: make the dirent implementation pluggable
-166:  cb6ccffcaf <   -:  ---------- Win32: make the lstat implementation pluggable
-167:  1ad0b305d1 <   -:  ---------- add infrastructure for read-only file system level caches
-168:  f12a9748c8 <   -:  ---------- mingw: add a cache below mingw's lstat and dirent implementations
-169:  5988ab6c36 <   -:  ---------- fscache: load directories only once
-170:  2d7d611ce2 <   -:  ---------- fscache: add key for GIT_TRACE_FSCACHE
-171:  f378e02744 <   -:  ---------- fscache: remember not-found directories
-172:  edfdcf604e <   -:  ---------- fscache: add a test for the dir-not-found optimization
-173:  fe050dbd04 <   -:  ---------- add: use preload-index and fscache for performance
-174:  67cb8641e2 <   -:  ---------- dir.c: make add_excludes aware of fscache during status
-175:  256e915f2e <   -:  ---------- fscache: make fscache_enabled() public
-176:  8023b6eb9a <   -:  ---------- dir.c: regression fix for add_excludes with fscache
-177:  978d3c634e <   -:  ---------- fetch-pack.c: enable fscache for stats under .git/objects
-178:  c1b4f66926 <   -:  ---------- checkout.c: enable fscache for checkout again
-179:  e1c68f70ad <   -:  ---------- Enable the filesystem cache (fscache) in refresh_index().
-180:  f9be7bfdf8 <   -:  ---------- fscache: use FindFirstFileExW to avoid retrieving the short name
-181:  56dc79a8ed <   -:  ---------- status: disable and free fscache at the end of the status command
-182:  2ae798fe8c <   -:  ---------- fscache: add GIT_TEST_FSCACHE support
-183:  60ce08b3ff <   -:  ---------- fscache: add fscache hit statistics
-184:  e6ad83962d <   -:  ---------- mem_pool: add GIT_TRACE_MEMPOOL support
-185:  d0187aeaed <   -:  ---------- fscache: fscache takes an initial size
-186:  05d90d7e1b <   -:  ---------- fscache: update fscache to be thread specific instead of global
-187:  c2039938d1 <   -:  ---------- fscache: teach fscache to use mempool
-188:  7419cbf08b <   -:  ---------- fscache: make fscache_enable() thread safe
-189:  cbb6d5cd57 <   -:  ---------- fscache: teach fscache to use NtQueryDirectoryFile
-190:  b10dc646bb <   -:  ---------- unpack-trees: enable fscache for sparse-checkout
-191:  2332abe0b8 <   -:  ---------- fscache: remember the reparse tag for each entry
-192:  978a1813b9 <   -:  ---------- fscache: implement an FSCache-aware is_mount_point()
-193:  dc7a1646e8 <   -:  ---------- clean: make use of FSCache
-194:  12a02bdaf6 <   -:  ---------- git-gui: provide question helper for retry fallback on Windows
-195:  e592881efb <   -:  ---------- git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
-196:  5c63f5d1bd <   -:  ---------- git-gui--askyesno: fix funny text wrapping
-197:  feba6463b4 <   -:  ---------- git-gui--askyesno: allow overriding the window title
-198:  50dc902307 <   -:  ---------- gitk: Unicode file name support
-199:  58792a953f <   -:  ---------- respect core.hooksPath, falling back to .git/hooks
-200:  3792600436 <   -:  ---------- git-gui--askyesno (mingw): use Git for Windows' icon, if available
-201:  bd8e80c0e0 <   -:  ---------- gitk: Use an external icon file on Windows
-202:  0713dd825d <   -:  ---------- gitk: fix arrow keys in input fields with Tcl/Tk >= 8.6
-203:  7976c46f65 <   -:  ---------- gitk: make the "list references" default window width wider
-204:  7ce635a182 <   -:  ---------- pack-objects (mingw): demonstrate a segmentation fault with large deltas
-205:  46043d38d5 <   -:  ---------- mingw: support long paths
-206:  e1c703cf57 <   -:  ---------- Win32: fix 'lstat("dir/")' with long paths
-207:  17bfa9e0f9 <   -:  ---------- mingw: ensure that core.longPaths is handled *always*
-208:  b4117bdf57 <   -:  ---------- mingw: Support `git_terminal_prompt` with more terminals
-209:  3fd881611a <   -:  ---------- compat/terminal.c: only use the Windows console if bash 'read -r' fails
-210:  ccf329e8bf <   -:  ---------- mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
-211:  591a434a07 <   -:  ---------- Unbreak interactive GPG prompt upon signing
-212:  39eb0ca65e <   -:  ---------- strbuf_readlink: don't call readlink twice if hint is the exact link size
-213:  bcc6137635 <   -:  ---------- strbuf_readlink: support link targets that exceed PATH_MAX
-214:  861ad6150c <   -:  ---------- lockfile.c: use is_dir_sep() instead of hardcoded '/' checks
-215:  ac991bc7c6 <   -:  ---------- Win32: don't call GetFileAttributes twice in mingw_lstat()
-216:  ab11ffd9ff <   -:  ---------- compat/fsmonitor/fsm-*-win32: support long paths
-217:  4ae705d6a9 <   -:  ---------- Win32: implement stat() with symlink support
-218:  655c3b9390 <   -:  ---------- Win32: remove separate do_lstat() function
-219:  172c62c4a4 <   -:  ---------- Win32: let mingw_lstat() error early upon problems with reparse points
-220:  606e325b25 <   -:  ---------- mingw: teach fscache and dirent about symlinks
-221:  7401e3bdc0 <   -:  ---------- Win32: lstat(): return adequate stat.st_size for symlinks
-222:  3bded6b1aa <   -:  ---------- Win32: factor out retry logic
 296:  089aed43bc =  24:  90eb88c48a t5505/t5516: allow running without `.git/branches/` in the templates
 297:  5aa891387c =  25:  223a8c700e mingw: allow `git.exe` to be used instead of the "Git wrapper"
 304:  8d75f89f2e =  26:  b049a2b921 t5505/t5516: fix white-space around redirectors
 305:  4a78e20a33 =  27:  6a715ef263 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
 322:  314db48ebe =  28:  550853f1dc clink.pl: fix libexpatd.lib link error when using MSVC
 324:  53c1e3748c =  29:  12156d69e1 Makefile: clean up .ilk files when MSVC=1
 326:  796ee120c5 =  30:  925b1bed6f vcbuild: add support for compiling Windows resource files
 328:  ac6f5d02ab =  31:  65eddead81 config.mak.uname: add git.rc to MSVC builds
 329:  fd0cc80d3b =  32:  f3f6c7968c vcpkg_install: detect lack of Git
 331:  71416041d1 =  33:  5f848ebd65 clink.pl: ignore no-stack-protector arg on MSVC=1 builds
 332:  2ef30ea8e7 =  34:  0efae65d86 vcpkg_install: add comment regarding slow network connections
 334:  72aca84515 =  35:  5709081d61 clink.pl: move default linker options for MSVC=1 builds
 335:  740476284f =  36:  a6a0d9650c vcxproj: support building Windows/ARM64 binaries
 337:  0d5c74514d =  37:  52e50ffa9b buildsystems: remove duplicate clause
 338:  eaeb690fd5 =  38:  17dedfcb99 vcbuild: install ARM64 dependencies when building ARM64 binaries
 340:  b56cb73dcf =  39:  7205ff9d79 vcxproj: handle resource files, too
 341:  12c9ac63f5 =  40:  96b3368421 vcbuild: add an option to install individual 'features'
 343:  3eab874487 =  41:  3f9cdd5847 vcxproj: ignore -fno-stack-protector and -fno-common
 344:  36130ed624 =  42:  e1dcdd23f6 cmake: allow building for Windows/ARM64
 346:  b62ecfb77a =  43:  e1cac8ee7d vcxproj: handle GUI programs, too
 347:  47b821f141 =  44:  77c6fa1808 ci(vs-build) also build Windows/ARM64 artifacts
 349:  769c83590a =  45:  b611d9bfdc Allow `add -p` and `add -i` with a large number of files
 350:  10937db114 =  46:  ee63a780a1 win32: add a helper to run `git.exe` without a foreground window
 351:  7964b3584e =  47:  f7dcb6cb26 Add schannel to curl installation
 306:  6ddb746977 =  48:  b1d1c48ec8 http: use new "best effort" strategy for Secure Channel revoke checking
 319:  faf01a263e =  49:  a13dfdb7f6 mingw: implement a platform-specific `strbuf_realpath()`
 353:  e2f7949478 =  50:  6923346699 t3701: verify that we can add *lots* of files interactively
 354:  1595a75e63 =  51:  8d2f0b48b6 git add -i: handle CR/LF line endings in the interactive input
 355:  8fd98b73a4 =  52:  32fe68b3a5 commit: accept "scissors" with CR/LF line endings
 356:  74908ee09c =  53:  c34ed53fec t0014: fix indentation
 357:  adcd8cc6b6 =  54:  2394a29eed git-gui: accommodate for intent-to-add files
 358:  58b4197c86 =  55:  55a7ca0c52 git maintenance: avoid console window in scheduled tasks on Windows
 320:  a0d602360a =  56:  3aed9c49be Add a GitHub workflow to generate Git for Windows' Pacman package
 321:  918a0fcf13 =  57:  053521a1dc git-artifacts: if GPG secrets are available, use them
 323:  52a2c39451 =  58:  5419a4273c git-artifacts: also code-sign, if configured via the secrets
 325:  8e83598505 =  59:  4b08857913 git-artifacts: also build the installer
 327:  92dd768f1e =  60:  9710470f0b git-artifacts: also build portable, mingit and mingit-busybox
 330:  67247b891e =  61:  c062b18210 git-artifacts: also build 32-bit versions
 333:  5d972678cf =  62:  12c6c01108 git-artifacts: also build the nuget package
 336:  dc7f836736 =  63:  47a75934cf git-artifacts: allow restricting which artifacts are built
 339:  9840477cdd =  64:  10bfd6d7e8 git-artifacts: allow specifying repo/ref via workflow_dispatch
 342:  a42aecdfc1 =  65:  2b790f298e git-artifacts: cache the build-installers artifact
 345:  f108bb14f8 =  66:  dfc7bdc1ab git-artifacts: use the cached build-installers instead of makepkg-git
 359:  11cd7b9bd7 =  67:  f632ed40e7 fsm-listen-win32: handle shortnames
 348:  80c1a31de8 =  68:  82ab0d6228 git-artifacts: add ARM64 artifacts
 360:  04ee0aa9c3 =  69:  0a51e33067 t7527: test FSMonitor on repos with Unicode root paths
 365:  52240e23ea =  70:  8ba209896b git-artifacts(arm64): avoid hard-linking the dashed built-ins
 361:  de0e76bdff =  71:  1efbb5b9c4 t/helper/fsmonitor-client: create stress test
 367:  1401fe3808 =  72:  339b8eb757 git-artifacts: use a narrower `PATH`
 362:  c91af5be5b =  73:  b0144836d5 fsmonitor-settings: bare repos are incompatible with FSMonitor
 369:  aec5d59b71 =  74:  ce3ae5f01f git-artifacts: fix BUILD_ONLY handling for ARM64
 363:  2cba54c9ce =  75:  1e927c03be fsmonitor-settings: stub in Win32-specific incompatibility checking
 371:  0df1172ec3 =  76:  37796238ee git-artifacts: extend the `SKIP` logic to handle `pkg` and `build-arm64`
 364:  2d9b975395 =  77:  e84e4d0de5 fsmonitor-settings: VFS for Git virtual repos are incompatible
 373:  f7a466a345 =  78:  8f5518c4d0 git-artifacts: mark all inputs as "not required"
 366:  eefb2b78d7 =  79:  ff9543325d fsmonitor-settings: stub in macOS-specific incompatibility checking
 375:  be5934c4a6 =  80:  463ca5842d git-artifacts(build-arm64): build artifacts using the intended Git revision
 352:  0f2c98a71a =  81:  0bf0250014 git-artifacts: add workaround for GCM Core on ARM64
 376:  d625fe2289 =  82:  e887fa227c cmake(): allow setting HOST_CPU for cross-compilation
 368:  897201542c =  83:  72df76c4ac fsmonitor-settings: remote repos on macOS are incompatible
 378:  dc7293b3f3 =  84:  f69d5492b4 git-artifacts: Use the shiny new setup-git-for-windows-sdk Action
 370:  9f67016feb =  85:  2afd0f864e fsmonitor-settings: remote repos on Windows are incompatible
 372:  f0d49f2fc4 =  86:  dd71ec28cb fsmonitor-settings: NTFS and FAT32 on MacOS are incompatible
 381:  8af6c4c193 =  87:  8761e36ac7 ci(): add HOST_CPU to CMake command
 374:  01942811bd =  88:  d31f3ed8d4 unpack-trees: initialize fsmonitor_has_run_once in o->result
 383:  de8de7909d =  89:  4b4357b045 CMake: default Visual Studio generator has changed
 377:  6eb3c6517a =  90:  0d126679d3 fsm-listen-darwin: ignore FSEvents caused by xattr changes on macOS
 385:  a8a5eba23d =  91:  213652aeb0 .gitignore: add Visual Studio CMakeSetting.json file
 379:  e2ecb89174 =  92:  71e617fe99 fsmonitor--daemon: cd out of worktree root
 387:  6fc230f4f7 =  93:  c14ffc9c2b subtree: update `contrib/subtree` `test` target
 388:  c372e3a181 =  94:  cb57b3eab7 CMakeLists: add default "x64-windows" arch for Visual Studio
 380:  5b13dccddd =  95:  6fb700859d fsmonitor--daemon: prepare for adding health thread
 390:  d1d76aeb35 =  96:  039c412a13 ci(vs-build): download the vcpkg artifacts using a dedicated Action
 391:  f89ad0686b =  97:  3c87d5e2bf mingw: allow for longer paths in `parse_interpreter()`
 392:  49a7099e49 =  98:  6cc2bbd231 compat/vcbuild: document preferred way to build in Visual Studio
 393:  a14b062e1b =  99:  48f4da0103 http: optionally send SSL client certificate
 394:  cabc621c67 = 100:  493c2b97bc ci: run `contrib/subtree` tests in CI builds
 395:  a5dd7e0139 = 101:  a61bf801c1 CMake: show Win32 and Generator_platform build-option values
 396:  eb9e008381 = 102:  4cc8eaa817 init: do parse _all_ core.* settings early
 382:  9364c53374 = 103:  237eae767d fsmonitor--daemon: rename listener thread related variables
 384:  df2f0d709d = 104:  4985ea180e fsmonitor--daemon: stub in health thread
 386:  a903c93add = 105:  7e55143a85 fsm-health-win32: add polling framework to monitor daemon health
 389:  a4bdf024bc = 106:  a41d256e05 fsm-health-win32: force shutdown daemon if worktree root moves
 397:  8552aaa338 = 107:  5d4396ceef bulk-checkin: rename 'state' variable and separate 'plugged' boolean
 398:  f6cf2b0cf0 = 108:  5c65472617 fsm-listen-darwin: shutdown daemon if worktree root is moved/renamed
 399:  98282bce8f = 109:  0633abbca4 bulk-checkin: rebrand plug/unplug APIs as 'odb transactions'
 400:  7cd4d2ce92 = 110:  569a619af9 fsmonitor: optimize processing of directory events
 401:  0e59ab067a = 111:  2cc21b1dab core.fsyncmethod: batched disk flushes for loose-objects
 402:  e0194e462e = 112:  216173ff3a t7527: FSMonitor tests for directory moves
 403:  b35da5e84e = 113:  fd84f6dc81 cache-tree: use ODB transaction around writing a tree
 404:  9df47ffbfc = 114:  062b07a67d t/perf/p7527: add perf test for builtin FSMonitor
 405:  16acda0e9e = 115:  0f6e6e1465 builtin/add: add ODB transaction around add_files_to_cache
 406:  c74fe76faa = 116:  5e4a6d3ae7 fsmonitor: never set CE_FSMONITOR_VALID on submodules
 407:  8c8a561245 = 117:  3aea0d37c6 hash-object: demonstrate a >4GB/LLP64 problem
 408:  ce05f0ea48 = 118:  9eb99dc853 update-index: use the bulk-checkin infrastructure
 409:  e6b9b2d67d = 119:  610b8fc0ba t7527: test FSMonitor on case insensitive+preserving file system
 410:  d5c331dbdd = 120:  2f609e0007 hash_object_file_literally(): use size_t
 411:  6aa87893d1 = 121:  3ef676b1a3 unpack-objects: use the bulk-checkin infrastructure
 412:  225aad3540 = 122:  9e3e43d549 fsmonitor: on macOS also emit NFC spelling for NFD pathname
 413:  c71b980e63 = 123:  f00ae0dc27 object-file.c: use size_t for header lengths
 414:  61ba069b4c = 124:  5814c499fe core.fsync: use batch mode and sync loose objects by default on Windows
 415:  768c49928c = 125:  d6fef66593 t/lib-unicode-nfc-nfd: helper prereqs for testing unicode nfc/nfd
 416:  4b8280fec7 = 126:  a3f3eee6f4 hash algorithms: use size_t for section lengths
 417:  dd25c1b3e6 = 127:  aaa227cb77 test-lib-functions: add parsing helpers for ls-files and ls-tree
 418:  1109b5751b = 128:  36579168c0 t7527: test Unicode NFC/NFD handling on MacOS
 419:  9680c62027 = 129:  963ded6449 hash-object --stdin: verify that it works with >4GB/LLP64
 420:  f426f5873f = 130:  e13449eab1 core.fsyncmethod: tests for batch mode
 421:  bc59337c19 ! 131:  371ba57bc2 fsmonitor: reintroduce core.useBuiltinFSMonitor
    @@ fsmonitor-settings.c: static int check_for_incompatible(struct repository *r)
      
     +static int check_deprecated_builtin_config(struct repository *r)
     +{
    -+	int core_use_builtin_fsmonitor;
    ++	int core_use_builtin_fsmonitor = 0;
     +
     +	/*
     +	 * If 'core.useBuiltinFSMonitor' is set, print a deprecation warning
    @@ fsmonitor-settings.c: static int check_for_incompatible(struct repository *r)
     +	 * set to true, set the appropriate mode and return 1 indicating that
     +	 * the check resulted the config being set by this (deprecated) setting.
     +	 */
    -+	if(!repo_config_get_bool(r, "core.useBuiltinFSMonitor", &core_use_builtin_fsmonitor)) {
    ++	if(!repo_config_get_bool(r, "core.useBuiltinFSMonitor", &core_use_builtin_fsmonitor) &&
    ++	   core_use_builtin_fsmonitor) {
     +		if (!git_env_bool("GIT_SUPPRESS_USEBUILTINFSMONITOR_ADVICE", 0)) {
     +			advise_if_enabled(ADVICE_USE_CORE_FSMONITOR_CONFIG,
     +					  _("core.useBuiltinFSMonitor will be deprecated "
     +					    "soon; use core.fsmonitor instead"));
     +			setenv("GIT_SUPPRESS_USEBUILTINFSMONITOR_ADVICE", "1", 1);
     +		}
    -+		if (core_use_builtin_fsmonitor) {
    -+			fsm_settings__set_ipc(r);
    -+			return 1;
    -+		}
    ++		fsm_settings__set_ipc(r);
    ++		return 1;
     +	}
     +
     +	return 0;
 422:  61186f1c35 = 132:  042b297772 hash-object: add another >4GB/LLP64 test case
 423:  2c694bb8bb = 133:  19360e9eba t/perf: add iteration setup mechanism to perf-lib
 424:  b65b1651cc = 134:  29928e1b1d Enable the built-in FSMonitor as an experimental feature
 425:  f760038e02 = 135:  830515b2ad hash-object: add a >4GB/LLP64 test case using filtered input
 426:  832026f473 = 136:  b1847e8dd5 core.fsyncmethod: performance tests for batch mode
 427:  c902a8ea02 = 137:  38511ac1be Win32: make FILETIME conversion functions public
 428:  bf4d8a52c9 = 138:  08f232cbc9 Win32: dirent.c: Move opendir down
 429:  6e34472218 = 139:  0a75d7e1e8 mingw: make the dirent implementation pluggable
 430:  92d94be83a = 140:  906aea130d Win32: make the lstat implementation pluggable
 431:  29da12be7e = 141:  146090bba7 add infrastructure for read-only file system level caches
 432:  7f60387fa0 = 142:  114943b6c8 mingw: add a cache below mingw's lstat and dirent implementations
 433:  a3af94e7de = 143:  b8e681966e fscache: load directories only once
 434:  9713acd6da = 144:  20572a137c fscache: add key for GIT_TRACE_FSCACHE
 435:  a983a024ee = 145:  0f396b534c fscache: remember not-found directories
 436:  5ab66ec115 = 146:  dac602c38a fscache: add a test for the dir-not-found optimization
 437:  6166327ff1 = 147:  a33710fc13 add: use preload-index and fscache for performance
 438:  5b6055b61b = 148:  42e968d247 dir.c: make add_excludes aware of fscache during status
 439:  50687007b0 = 149:  c4b410d3e3 fscache: make fscache_enabled() public
 440:  dfd07e4ffc = 150:  8cc6d5553f dir.c: regression fix for add_excludes with fscache
 441:  112d322e1c = 151:  2c66f91ec6 fetch-pack.c: enable fscache for stats under .git/objects
 442:  28a78012c4 = 152:  76727ea536 checkout.c: enable fscache for checkout again
 443:  48d1643a0f = 153:  a765cbcb89 Enable the filesystem cache (fscache) in refresh_index().
 444:  9488dc5f0f = 154:  b94eef6327 fscache: use FindFirstFileExW to avoid retrieving the short name
 445:  8a0c181b54 = 155:  775cdefcf8 status: disable and free fscache at the end of the status command
 446:  33e8946c00 = 156:  b955478ced fscache: add GIT_TEST_FSCACHE support
 447:  625b7b8465 = 157:  b5c2561308 fscache: add fscache hit statistics
 448:  fa6d04b5f0 = 158:  9c43828344 mem_pool: add GIT_TRACE_MEMPOOL support
 449:  f583fad172 = 159:  02a974dfa6 fscache: fscache takes an initial size
 450:  daad3dde7b = 160:  18edd84a00 fscache: update fscache to be thread specific instead of global
 451:  19baeefecc = 161:  f6ba4a6029 fscache: teach fscache to use mempool
 452:  b5e6c06bd3 = 162:  ab1c63e9ea fscache: make fscache_enable() thread safe
 453:  a5e6d1ac62 = 163:  f8783d648c git-gui: provide question helper for retry fallback on Windows
 454:  1b800dd5f7 = 164:  f4cce13a21 fscache: teach fscache to use NtQueryDirectoryFile
 455:  4bd4c79b71 = 165:  f819f120ea git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
 456:  412644046b = 166:  38ec59c740 gitk: Unicode file name support
 457:  f3034c99f3 = 167:  270140ed5a unpack-trees: enable fscache for sparse-checkout
 458:  37664d5e08 = 168:  fb9e5c37b7 git-gui--askyesno: fix funny text wrapping
 459:  3f7d528c8c = 169:  34bb009360 gitk: Use an external icon file on Windows
 460:  dc0861d957 = 170:  737e8bb478 fscache: remember the reparse tag for each entry
 461:  553a6f73f6 = 171:  70cff622b3 git-gui--askyesno: allow overriding the window title
 462:  1ac69d0e2b = 172:  58b0121b1f gitk: fix arrow keys in input fields with Tcl/Tk >= 8.6
 463:  81eff8bcba = 173:  22bf23d767 fscache: implement an FSCache-aware is_mount_point()
 464:  c0f027f4bf = 174:  6e82c0a912 respect core.hooksPath, falling back to .git/hooks
 465:  244d39f130 = 175:  112abacb06 git-gui--askyesno (mingw): use Git for Windows' icon, if available
 466:  518f51cf76 = 176:  201f0f9a9f gitk: make the "list references" default window width wider
 467:  d52798e0f4 = 177:  bf37d21fe5 clean: make use of FSCache
 468:  4909d3cdc8 = 178:  7ded10e5ef pack-objects (mingw): demonstrate a segmentation fault with large deltas
 469:  0a6c2b201e ! 179:  6e41989453 mingw: support long paths
    @@ compat/mingw.h: typedef _sigset_t sigset_t;
      
      int mingw_core_config(const char *var, const char *value, void *cb);
      #define platform_core_config mingw_core_config
    -@@ compat/mingw.h: char *mingw_strbuf_realpath(struct strbuf *resolved, const char *path);
    +@@ compat/mingw.h: int is_path_owned_by_current_sid(const char *path);
      int is_valid_win32_path(const char *path, int allow_literal_nul);
      #define is_valid_path(path) is_valid_win32_path(path, 0)
      
 470:  d5df0573e3 = 180:  d1012e5d22 Win32: fix 'lstat("dir/")' with long paths
 471:  bb8f91d878 = 181:  0eee62837a mingw: ensure that core.longPaths is handled *always*
 472:  7cb5197d4e = 182:  e40bf625c8 mingw: Support `git_terminal_prompt` with more terminals
 473:  0677648228 = 183:  dc751ee1f8 compat/terminal.c: only use the Windows console if bash 'read -r' fails
 474:  9a4f52d71f = 184:  25c6d03b94 mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
 475:  114c0d2526 = 185:  ec2dc25145 Unbreak interactive GPG prompt upon signing
 476:  2082b49a47 = 186:  acb7a379b9 strbuf_readlink: don't call readlink twice if hint is the exact link size
 477:  602bcfe065 = 187:  55588f2b43 strbuf_readlink: support link targets that exceed PATH_MAX
 478:  f3de4bb65f = 188:  46eba2f018 lockfile.c: use is_dir_sep() instead of hardcoded '/' checks
 479:  512d05dcc1 = 189:  844dd5886d Win32: don't call GetFileAttributes twice in mingw_lstat()
 480:  a5f561c127 = 190:  3efc5ab42f Win32: implement stat() with symlink support
 481:  dc7ba21cab = 191:  a78c837ddc Win32: remove separate do_lstat() function
 482:  544f6e82b6 = 192:  dfdb11cca7 Win32: let mingw_lstat() error early upon problems with reparse points
 483:  1ec5795561 = 193:  f7e04528eb mingw: teach fscache and dirent about symlinks
 484:  6a6f646b59 = 194:  89935098e5 Win32: lstat(): return adequate stat.st_size for symlinks
 485:  c19b77e063 = 195:  abdb299399 Win32: factor out retry logic
 223:  54e1045c4c = 196:  2c5b8bbdbd Win32: change default of 'core.symlinks' to false
-224:  1e064be0de <   -:  ---------- Win32: add symlink-specific error codes
-225:  b9fedd6630 <   -:  ---------- Win32: mingw_unlink: support symlinks to directories
-226:  406123cb7e <   -:  ---------- Win32: mingw_rename: support renaming symlinks
-227:  c155e83ed1 <   -:  ---------- Win32: mingw_chdir: change to symlink-resolved directory
 487:  e4de6133d4 = 197:  28febe7fda Win32: add symlink-specific error codes
 488:  c397473f10 = 198:  e1ae98085a Win32: mingw_unlink: support symlinks to directories
 489:  1625348d93 = 199:  98f949e02b Win32: mingw_rename: support renaming symlinks
 491:  a5ebcee476 = 200:  617ec51e8a Win32: mingw_chdir: change to symlink-resolved directory
 228:  3b2de86616 = 201:  49361c071f Win32: implement readlink()
-229:  d0f5019be3 <   -:  ---------- mingw: lstat: compute correct size for symlinks
-230:  4509f6ee1e <   -:  ---------- Win32: implement basic symlink() functionality (file symlinks only)
-231:  1808c6886b <   -:  ---------- Win32: symlink: add support for symlinks to directories
-232:  33c1b8d9c8 <   -:  ---------- mingw: try to create symlinks without elevated permissions
-233:  7ba5a28e4c <   -:  ---------- mingw: emulate stat() a little more faithfully
-234:  08f6d76fc7 <   -:  ---------- mingw: special-case index entries for symlinks with buggy size
-235:  1384b473d4 <   -:  ---------- mingw: introduce code to detect whether we're inside a Windows container
-236:  e9179ee9a8 <   -:  ---------- mingw: when running in a Windows container, try to rename() harder
-237:  1ab71a59f1 <   -:  ---------- Win32: symlink: move phantom symlink creation to a separate function
-238:  316a747812 <   -:  ---------- mingw: move the file_attr_to_st_mode() function definition
-239:  4a68e31d5a <   -:  ---------- Introduce helper to create symlinks that knows about index_state
-240:  b6eb7f108c <   -:  ---------- mingw: Windows Docker volumes are *not* symbolic links
-241:  a86efc21bd <   -:  ---------- mingw: allow to specify the symlink type in .gitattributes
-242:  9deafebe52 <   -:  ---------- Win32: symlink: add test for `symlink` attribute
-243:  0164f9e580 <   -:  ---------- mingw: explicitly specify with which cmd to prefix the cmdline
-244:  0455ac6f3a <   -:  ---------- mingw: when path_lookup() failed, try BusyBox
-245:  8a3bd56983 <   -:  ---------- test-lib: avoid unnecessary Perl invocation
-246:  264f540e63 <   -:  ---------- tests: replace mingw_test_cmp with a helper in C
-247:  230c4b7505 <   -:  ---------- test-tool: learn to act as a drop-in replacement for `iconv`
-248:  439a48c62d <   -:  ---------- tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
-249:  9202eb1155 <   -:  ---------- gitattributes: mark .png files as binary
-250:  4752d15fff <   -:  ---------- tests: move test PNGs into t/lib-diff/
-251:  8eadce0ede <   -:  ---------- tests: only override sort & find if there are usable ones in /usr/bin/
 493:  170899a52b = 202:  a90a180ea9 mingw: lstat: compute correct size for symlinks
 494:  286132f6f0 = 203:  cf1318d59f Win32: implement basic symlink() functionality (file symlinks only)
 490:  032a2e5f61 = 204:  259c006de1 compat/fsmonitor/fsm-*-win32: support long paths
 495:  ac055f6b77 = 205:  b444506706 Win32: symlink: add support for symlinks to directories
 496:  a06eda1d51 = 206:  880c79d43b mingw: try to create symlinks without elevated permissions
 497:  a7fe7028e3 = 207:  36f6f3f2cb mingw: emulate stat() a little more faithfully
 498:  ad843f0509 = 208:  5dc2070f00 mingw: special-case index entries for symlinks with buggy size
 499:  af0bfd73d2 = 209:  8212959958 Win32: symlink: move phantom symlink creation to a separate function
 500:  d0a567060f = 210:  86ea7f5e0b Introduce helper to create symlinks that knows about index_state
 501:  d3fb69b1ba = 211:  62c9b06802 mingw: allow to specify the symlink type in .gitattributes
 502:  1db8af57d1 = 212:  026a8ef118 Win32: symlink: add test for `symlink` attribute
 503:  d95bb7720d = 213:  96747f4b40 mingw: explicitly specify with which cmd to prefix the cmdline
 504:  cbc956b9c8 = 214:  304ecc405f mingw: when path_lookup() failed, try BusyBox
 505:  45d01824fd = 215:  66d99c5ed4 test-lib: avoid unnecessary Perl invocation
 506:  db5bc614e3 = 216:  29a5f0db80 tests: replace mingw_test_cmp with a helper in C
 507:  dde7a4f170 = 217:  789f4fd3c9 test-tool: learn to act as a drop-in replacement for `iconv`
 508:  1fd240c96b = 218:  98178258f0 tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
 509:  1a7febc347 = 219:  1a2ff9e925 gitattributes: mark .png files as binary
 510:  c1ed83f6c6 = 220:  c45bd1eced tests: move test PNGs into t/lib-diff/
 511:  8dfa55fbc6 = 221:  f515ca918f tests: only override sort & find if there are usable ones in /usr/bin/
 252:  d998d58e55 = 222:  de7d3498ff tests: use the correct path separator with BusyBox
-253:  a3773fde63 <   -:  ---------- mingw: only use Bash-ism `builtin pwd -W` when available
-254:  5c30d97ebd <   -:  ---------- tests (mingw): remove Bash-specific pwd option
-255:  b55ad7c70d <   -:  ---------- test-lib: add BUSYBOX prerequisite
-256:  7c2d434bff <   -:  ---------- t0021: use Windows path when appropriate
-257:  f53275d9c0 <   -:  ---------- t5003: use binary file from t/lib-diff/
-258:  f9126635a7 <   -:  ---------- t5532: workaround for BusyBox on Windows
-259:  7bf6bdff71 <   -:  ---------- t5605: special-case hardlink test for BusyBox-w32
-260:  5c4bddb717 <   -:  ---------- t5813: allow for $PWD to be a Windows path
-261:  d622595986 <   -:  ---------- t9200: skip tests when $PWD contains a colon
-262:  2dd49d44e8 <   -:  ---------- mingw: add a Makefile target to copy test artifacts
-263:  9791d4cc2c <   -:  ---------- mingw: kill child processes in a gentler way
-264:  be5554d69f <   -:  ---------- mingw: really handle SIGINT
-265:  117ba9f0ca <   -:  ---------- bulk-checkin: rename 'state' variable and separate 'plugged' boolean
-266:  b4be3919ff <   -:  ---------- core.fsyncobjectfiles: batched disk flushes
-267:  d94edbac81 <   -:  ---------- core.fsyncobjectfiles: add windows support for batch mode
-268:  a28fb87b2f <   -:  ---------- update-index: use the bulk-checkin infrastructure
-269:  cc34e7b6bd <   -:  ---------- unpack-objects: use the bulk-checkin infrastructure
-270:  e4cab72e3f <   -:  ---------- core.fsyncobjectfiles: tests for batch mode
-271:  d8845a72de <   -:  ---------- core.fsyncobjectfiles: performance tests for add and stash
-272:  e4cc300412 <   -:  ---------- mingw: do not call xutftowcs_path in mingw_mktemp
-273:  670cac697d <   -:  ---------- mingw: make core.fsyncObjectFiles default explicit
-274:  3924efcac8 <   -:  ---------- Partially un-revert "editor: save and reset terminal after calling EDITOR"
-275:  f4990988d7 <   -:  ---------- status: carry the --no-lock-index option for backwards-compatibility
-276:  60b1d89a87 <   -:  ---------- gpg-interface: trim CR from ssh-keygen -Y find-principals
-277:  973fab2269 <   -:  ---------- Modify the Code of Conduct for Git for Windows
-278:  f2c6822899 <   -:  ---------- CONTRIBUTING.md: add guide for first-time contributors
-279:  167c12e66b <   -:  ---------- README.md: Add a Windows-specific preamble
-280:  9e49d9b95e <   -:  ---------- Add an issue template
-281:  4b85c2eb6a <   -:  ---------- status: reinstate --show-ignored-directory as a deprecated option
-282:  b85b1e5950 <   -:  ---------- reset: reinstate support for the deprecated --stdin option
-283:  66a6bcf83c <   -:  ---------- mingw: deprecate old-style runtime-prefix handling in interpolate_path()
-284:  eef1deca15 <   -:  ---------- Add a GitHub workflow to monitor component updates
-285:  0bb0f96b55 <   -:  ---------- Modify the GitHub Pull Request template (to reflect Git for Windows)
-286:  284dfb52c7 <   -:  ---------- .github: Add configuration for the Sentiment Bot
-287:  e91c210c20 <   -:  ---------- Document how $HOME is set on Windows
-288:  6d0b6351b3 <   -:  ---------- SECURITY.md: document Git for Windows' policies
 513:  45b90bb7e3 = 223:  408a5fc59d mingw: only use Bash-ism `builtin pwd -W` when available
 514:  b3ca8621c1 = 224:  7c5bb6ec25 tests (mingw): remove Bash-specific pwd option
 515:  fe648cffb0 = 225:  0126d53d53 test-lib: add BUSYBOX prerequisite
 516:  f30aebe378 = 226:  54fb9c4794 t0021: use Windows path when appropriate
 517:  3d539b1761 = 227:  ec5ada50f0 t5003: use binary file from t/lib-diff/
 518:  066d766bdc = 228:  c8365cb2c7 t5532: workaround for BusyBox on Windows
 519:  27c31617cd = 229:  d59af0756c mingw: introduce code to detect whether we're inside a Windows container
 520:  fca77753b2 = 230:  2483546665 t5605: special-case hardlink test for BusyBox-w32
 521:  e5162b84a0 = 231:  4462e8ba62 mingw: when running in a Windows container, try to rename() harder
 522:  f9df0a131c = 232:  ae5d6b0da2 t5813: allow for $PWD to be a Windows path
 523:  62b4060b0a = 233:  4918f39a17 mingw: move the file_attr_to_st_mode() function definition
 524:  02bf73258e = 234:  b0ee922c21 t9200: skip tests when $PWD contains a colon
 533:  8fb7ef4861 = 235:  d833cee7ba mingw: kill child processes in a gentler way
 534:  8e543ce79c = 236:  11a290d7cb mingw: do not call xutftowcs_path in mingw_mktemp
 525:  e6a832a290 = 237:  0bcc0ed50a mingw: Windows Docker volumes are *not* symbolic links
 535:  1ee9a0f9e7 = 238:  5d1e0c6f3d status: carry the --no-lock-index option for backwards-compatibility
 526:  4beadd0298 = 239:  8464315903 mingw: add a Makefile target to copy test artifacts
 537:  e6aa5a9729 = 240:  124609a014 mingw: really handle SIGINT
 538:  cf0ccbdd42 = 241:  8ab1a6da5c Partially un-revert "editor: save and reset terminal after calling EDITOR"
 527:  31f9ef3a58 = 242:  56bf049d52 Modify the Code of Conduct for Git for Windows
 528:  63c3df69a5 = 243:  c04c401fac CONTRIBUTING.md: add guide for first-time contributors
 529:  45c5477c05 = 244:  5444e58b32 README.md: Add a Windows-specific preamble
 530:  fc2952f7de = 245:  1eb2e750a1 Add an issue template
 531:  34fe20f683 = 246:  8a001c4722 Modify the GitHub Pull Request template (to reflect Git for Windows)
 532:  522bc12edb = 247:  7b95afbfa1 .github: Add configuration for the Sentiment Bot
 536:  bd1397bfc0 = 248:  bfe5ad0664 Document how $HOME is set on Windows
 539:  c10896df1c = 249:  0e8e0e8d87 status: reinstate --show-ignored-directory as a deprecated option
 540:  d9a68f4d83 = 250:  6753e36df5 reset: reinstate support for the deprecated --stdin option
 541:  4d05d15043 = 251:  01d80a17ba mingw: deprecate old-style runtime-prefix handling in interpolate_path()
 542:  55f50876b0 = 252:  1012bbb2e9 Add a GitHub workflow to monitor component updates
 543:  dd4cf6b9ad = 253:  16a922974b SECURITY.md: document Git for Windows' policies
 544:  ccfd176ed7 = 254:  fd0f8d83f8 rebase: help user when dying with preserve-merges`
 545:  6cabbcb05a = 255:  69e6276ccb rebase: `preserve` is also a pull option, tell dying users
 289:  6c07169f64 = 256:  6edc4b227e Allow debugging unsafe directories' ownership
 290:  518ccba235 = 257:  698ee939a4 mingw: handle a file owned by the Administrators group correctly
-293:  adc9f0127d <   -:  ---------- mingw: ensure valid CTYPE
-314:  5c43d62ebd <   -:  ---------- Config option to disable side-band-64k for transport
-486:  d8adf772b8 <   -:  ---------- Win32: change default of 'core.symlinks' to false
-492:  4e7d7824a5 <   -:  ---------- Win32: implement readlink()
-512:  c2154ea023 <   -:  ---------- tests: use the correct path separator with BusyBox
-546:  0231a90991 <   -:  ---------- fixup! fsmonitor: reintroduce core.useBuiltinFSMonitor
 547:  16f733a03e = 258:  3ef2e3f835 Include trailing slash in prefix instructions
 548:  1bdb9e35c0 = 259:  35e1b47156 t0033: add tests for safe.directory
 549:  5d60f3c4e1 = 260:  76e46fa585 setup: fix safe.directory key not being checked
 550:  93310f0ac0 = 261:  6d9766becb setup: opt-out of check with safe.directory=*
 551:  e64daf281c = 262:  fde93f36e1 setup: properly use "%(prefix)/" when in WSL
 552:  109ae350a0 = 263:  0ba14f3f68 compat/mingw.c: do not warn when failing to get owner

@vdye vdye added this to the Next release milestone Apr 12, 2022
@vdye vdye requested a review from derrickstolee April 12, 2022 19:14
@vdye vdye self-assigned this Apr 12, 2022
Copy link

@derrickstolee derrickstolee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for dealing with this tricky rebase!

vdye and others added 25 commits April 18, 2022 08:29
The intention of this change is to align with how the top-level git
`Makefile` defines its own test target (which also internally calls
`$(MAKE) -C t/ all`). This change also ensures the consistency of
`make -C contrib/subtree test` with other testing in CI executions
(which rely on `$DEFAULT_TEST_TARGET` being defined as `prove`).

Signed-off-by: Victoria Dye <vdye@github.com>
In Git-for-Windows, work on using ARM64 has progressed. The
commit 2d94b77 (cmake: allow building for Windows/ARM64, 2020-12-04)
failed to notice that /compat/vcbuild/vcpkg_install.bat will default to
using the "x64-windows" architecture for the vcpkg installation if not set,
but CMake is not told of this default. Commit 635b6d9 (vcbuild: install
ARM64 dependencies when building ARM64 binaries, 2020-01-31) later updated
vcpkg_install.bat to accept an arch (%1) parameter, but retained the default.

This default is neccessary for the use case where the project directory is
opened directly in Visual Studio, which will find and build a CMakeLists.txt
file without any parameters, thus expecting use of the default setting.

Also Visual studio will generate internal .sln solution and .vcxproj project
files needed for some extension tools. Inform users of the additional
.sln/.vcxproj generation.

** How to test:
 rm -rf '.vs' # remove old visual studio settings
 rm -rf 'compat/vcbuild/vcpkg' # remove any vcpkg downloads
 rm -rf 'contrib/buildsystems/out' # remove builds & CMake artifacts
 with a fresh Visual Studio Community Edition, File>>Open>>(git *folder*)
   to load the project (which will take some time!).
 check for successful compilation.
The implicit .sln (etc.) are in the hidden .vs directory created by
Visual Studio.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Refactor daemon thread startup to make it easier to start
a third thread class to monitor the health of the daemon.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
As mentioned in the Makefile and CMakeLists.txt: "When cross-compiling, define HOST_CPU as the canonical name of the CPU on which the built Git will run (for instance "x86_64")"

This commit sets the HOST_CPU variable since Git for Windows arm64 is cross-compiled from an amd64 host.

Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
We now have a GitHub Action to download and cache Azure Pipelines
artifacts (such as the `vcpkg` artifacts), hiding gnarly internals, and
also providing some robustness against network glitches. Let's use it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
As reported in newren/git-filter-repo#225, it
looks like 99 bytes is not really sufficient to represent e.g. the full
path to Python when installed via Windows Store (and this path is used
in the hasb bang line when installing scripts via `pip`).

Let's increase it to what is probably the maximum sensible path size:
MAX_PATH. This makes `parse_interpreter()` in line with what
`lookup_prog()` handles.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Vilius Šumskas <vilius@sumskas.eu>
We used to have that `make vcxproj` hack, but a hack it is. In the
meantime, we have a much cleaner solution: using CMake, either
explicitly, or even more conveniently via Visual Studio's built-in CMake
support (simply open Git's top-level directory via File>Open>Folder...).

Let's let the `README` reflect this.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This adds support for a new http.sslAutoClientCert config value.

In cURL 7.77 or later the schannel backend does not automatically send
client certificates from the Windows Certificate Store anymore.

This config value is only used if http.sslBackend is set to "schannel",
and can be used to opt in to the old behavior and force cURL to send
client certificates.

This fixes #3292

Signed-off-by: Pascal Muller <pascalmuller@gmail.com>
Because `git subtree` (unlike most other `contrib` modules) is included as
part of the standard release of Git for Windows, its stability should be
verified as consistently as it is for the rest of git. By including the
`git subtree` tests in the CI workflow, these tests are as much of a gate to
merging and indicator of stability as the standard test suite.

Signed-off-by: Victoria Dye <vdye@github.com>
Ensure key CMake option values are part of the CMake output to
facilitate user support when tool updates impact the wider CMake
actions, particularly ongoing 'improvements' in Visual Studio.

These CMake displays perform the same function as the build-options.txt
provided in the main Git for Windows. CMake is already chatty.
The setting of CMAKE_EXPORT_COMPILE_COMMANDS is also reported.

Include the environment's CMAKE_EXPORT_COMPILE_COMMANDS value which
may have been propogated to CMake's internal value.

Testing the CMAKE_EXPORT_COMPILE_COMMANDS processing can be difficult
in the Visual Studio environment, as it may be cached in many places.
The 'environment' may include the OS, the user shell, CMake's
own environment, along with the Visual Studio presets and caches.

See previous commit for arefacts that need removing for a clean test.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
In Git for Windows, `has_symlinks` is set to 0 by default. Therefore, we
need to parse the config setting `core.symlinks` to know if it has been
set to `true`. In `git init`, we must do that before copying the
templates because they might contain symbolic links.

Even if the support for symbolic links on Windows has not made it to
upstream Git yet, we really should make sure that all the `core.*`
settings are parsed before proceeding, as they might very well change
the behavior of `git init` in a way the user intended.

This fixes #3414

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Rename platform-specific listener thread related variables
and data types as we prepare to add another backend thread
type.

[] `struct fsmonitor_daemon_backend_data` becomes `struct fsm_listen_data`
[] `state->backend_data` becomes `state->listen_data`
[] `state->error_code` becomes `state->listen_error_code`

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Create another thread to watch over the daemon process and
automatically shut it down if necessary.

This commit creates the basic framework for a "health" thread
to monitor the daemon and/or the file system.  Later commits
will add platform-specific code to do the actual work.

The "health" thread is intended to monitor conditions that
would be difficult to track inside the IPC thread pool and/or
the file system listener threads.  For example, when there are
file system events outside of the watched worktree root or if
we want to have an idle-timeout auto-shutdown feature.

This commit creates the health thread itself, defines the thread-proc
and sets up the thread's event loop.  It integrates this new thread
into the existing IPC and Listener thread models.

This commit defines the API to the platform-specific code where all of
the monitoring will actually happen.

The platform-specific code for MacOS is just stubs.  Meaning that the
health thread will immediately exit on MacOS, but that is OK and
expected.  Future work can define MacOS-specific monitoring.

The platform-specific code for Windows sets up enough of the
WaitForMultipleObjects() machinery to watch for system and/or custom
events.  Currently, the set of wait handles only includes our custom
shutdown event (sent from our other theads).  Later commits in this
series will extend the set of wait handles to monitor other
conditions.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
This commit prepares for adding batch-fsync to the bulk-checkin
infrastructure.

The bulk-checkin infrastructure is currently used to batch up addition
of large blobs to a packfile. When a blob is larger than
big_file_threshold, we unconditionally add it to a pack. If bulk
checkins are 'plugged', we allow multiple large blobs to be added to a
single pack until we reach the packfile size limit; otherwise, we simply
make a new packfile for each large blob. The 'unplug' call tells us when
the series of blob additions is done so that we can finish the packfiles
and make their objects available to subsequent operations.

Stated another way, bulk-checkin allows callers to define a transaction
that adds multiple objects to the object database, where the object
database can optimize its internal operations within the transaction
boundary.

Batched fsync will fit into bulk-checkin by taking advantage of the
plug/unplug functionality to determine the appropriate time to fsync
and make newly-added objects available in the primary object database.

* Rename 'state' variable to 'bulk_checkin_state', since we will later
  be adding 'bulk_fsync_objdir'.  This also makes the variable easier to
  find in the debugger, since the name is more unique.

* Move the 'plugged' data member of 'bulk_checkin_state' into a separate
  static variable. Doing this avoids resetting the variable in
  finish_bulk_checkin when zeroing the 'bulk_checkin_state'. As-is, we
  seem to unintentionally disable the plugging functionality the first
  time a new packfile must be created due to packfile size limits. While
  disabling the plugging state only results in suboptimal behavior for
  the current code, it would be fatal for the bulk-fsync functionality
  later in this patch series.

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Extend the Windows version of the "health" thread to periodically
inspect the system and shutdown if warranted.

This commit updates the thread's wait loop to use a timeout and
defines a (currently empty) table of functions to poll the system.

A later commit will add functions to the table to actually
inspect the system.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Make it clearer in the naming and documentation of the plug_bulk_checkin
and unplug_bulk_checkin APIs that they can be thought of as
a "transaction" to optimize operations on the object database. These
transactions may be nested so that subsystems like the cache-tree
writing code can optimize their operations without caring whether the
top-level code has a transaction active.

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Force shutdown fsmonitor daemon if the worktree root directory
is moved, renamed, or deleted.

Use Windows low-level GetFileInformationByHandle() to get and
compare the Windows system unique ID for the directory with a
cached version when we started up.  This lets us detect the
case where someone renames the directory that we are watching
and then creates a new directory with the original pathname.

This is important because we are listening to a named pipe for
requests and they are stored in the Named Pipe File System (NPFS)
which a kernel-resident pseudo filesystem not associated with
the actual NTFS directory.

For example, if the daemon was watching "~/foo/", it would have
a directory-watch handle on that directory and a named-pipe
handle for "//./pipe/...foo".  Moving the directory to "~/bar/"
does not invalidate the directory handle.  (So the daemon would
actually be watching "~/bar" but listening on "//./pipe/...foo".
If the user then does "git init ~/foo" and causes another daemon
to start, the first daemon will still have ownership of the pipe
and the second daemon instance will fail to start.  "git status"
clients in "~/foo" will ask "//./pipe/...foo" about changes and
the first daemon instance will tell them about "~/bar".

This commit causes the first daemon to shutdown if the system unique
ID for "~/foo" changes (changes from what it was when the daemon
started).  Shutdown occurs after a periodic poll.  After the
first daemon exits and releases the lock on the named pipe,
subsequent Git commands may cause another daemon to be started
on "~/foo".  Similarly, a subsequent Git command may cause another
daemon to be started on "~/bar".

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
When adding many objects to a repo with `core.fsync=loose-object`,
the cost of fsync'ing each object file can become prohibitive.

One major source of the cost of fsync is the implied flush of the
hardware writeback cache within the disk drive. This commit introduces
a new `core.fsyncMethod=batch` option that batches up hardware flushes.
It hooks into the bulk-checkin odb-transaction functionality, takes
advantage of tmp-objdir, and uses the writeout-only support code.

When the new mode is enabled, we do the following for each new object:
1a. Create the object in a tmp-objdir.
2a. Issue a pagecache writeback request and wait for it to complete.

At the end of the entire transaction when unplugging bulk checkin:
1b. Issue an fsync against a dummy file to flush the log and hardware
   writeback cache, which should by now have seen the tmp-objdir writes.
2b. Rename all of the tmp-objdir files to their final names.
3b. When updating the index and/or refs, we assume that Git will issue
   another fsync internal to that operation. This is not the default
   today, but the user now has the option of syncing the index and there
   is a separate patch series to implement syncing of refs.

On a filesystem with a singular journal that is updated during name
operations (e.g. create, link, rename, etc), such as NTFS, HFS+, or XFS
we would expect the fsync to trigger a journal writeout so that this
sequence is enough to ensure that the user's data is durable by the time
the git command returns. This sequence also ensures that no object files
appear in the main object store unless they are fsync-durable.

Batch mode is only enabled if core.fsync includes loose-objects. If
the legacy core.fsyncObjectFiles setting is enabled, but core.fsync does
not include loose-objects, we will use file-by-file fsyncing.

In step (1a) of the sequence, the tmp-objdir is created lazily to avoid
work if no loose objects are ever added to the ODB. We use a tmp-objdir
to maintain the invariant that no loose-objects are visible in the main
ODB unless they are properly fsync-durable. This is important since
future ODB operations that try to create an object with specific
contents will silently drop the new data if an object with the target
hash exists without checking that the loose-object contents match the
hash. Only a full git-fsck would restore the ODB to a functional state
where dataloss doesn't occur.

In step (1b) of the sequence, we issue a fsync against a dummy file
created specifically for the purpose. This method has a little higher
cost than using one of the input object files, but makes adding new
callers of this mechanism easier, since we don't need to figure out
which object file is "last" or risk sharing violations by caching the fd
of the last object file.

_Performance numbers_:

Linux - Hyper-V VM running Kernel 5.11 (Ubuntu 20.04) on a fast SSD.
Mac - macOS 11.5.1 running on a Mac mini on a 1TB Apple SSD.
Windows - Same host as Linux, a preview version of Windows 11.

Adding 500 files to the repo with 'git add' Times reported in seconds.

object file syncing | Linux | Mac   | Windows
--------------------|-------|-------|--------
           disabled | 0.06  |  0.35 | 0.61
              fsync | 1.88  | 11.18 | 2.47
              batch | 0.15  |  0.41 | 1.53

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Teach the listener thread to shutdown the daemon if the spelling of the
worktree root directory changes.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Take advantage of the odb transaction infrastructure around writing the
cached tree to the object database.

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Teach Git to perform binary search over the cache-entries for a directory
notification and then linearly scan forward to find the immediate children.

Previously, when the FSMonitor reported a modified directory Git would
perform a linear search on the entire cache-entry array for all
entries matching that directory prefix and invalidate them.  Since the
cache-entry array is already sorted, we can use a binary search to
find the first matching entry and then only linearly walk forward and
invalidate entries until the prefix changes.

Also, the original code would invalidate anything having the same
directory prefix.  Since a directory event should only be received for
items that are immediately within the directory (and not within
sub-directories of it), only invalidate those entries and not the
whole subtree.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
The add_files_to_cache function is invoked internally by
builtin/commit.c and builtin/checkout.c for their flags that stage
modified files before doing the larger operation. These commands
can benefit from batched fsyncing.

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Create unit tests to move a directory.  Verify that `git status`
gives the same result with and without FSMonitor enabled.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
On LLP64 systems, such as Windows, the size of `long`, `int`, etc. is
only 32 bits (for backward compatibility). Git's use of `unsigned long`
for file memory sizes in many places, rather than size_t, limits the
handling of large files on LLP64 systems (commonly given as `>4GB`).

Provide a minimum test for handling a >4GB file. The `hash-object`
command, with the  `--literally` and without `-w` option avoids
writing the object, either loose or packed. This avoids the code paths
hitting the `bigFileThreshold` config test code, the zlib code, and the
pack code.

Subsequent patches will walk the test's call chain, converting types to
`size_t` (which is larger in LLP64 data models) where appropriate.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The update-index functionality is used internally by 'git stash push' to
setup the internal stashed commit.

This change enables odb-transactions for update-index infrastructure to
speed up adding new objects to the object database by leveraging the
batch fsync functionality.

There is some risk with this change, since under batch fsync, the object
files will be in a tmp-objdir until update-index is complete, so callers
using the --stdin option will not see them until update-index is done.
This risk is mitigated by not keeping an ODB transaction open around
--stdin processing if in --verbose mode. Without --verbose mode,
a caller feeding update-index via --stdin wouldn't know when
update-index adds an object, event without an ODB transaction.

Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
@dscho dscho temporarily deployed to monitor-components April 20, 2022 11:30 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 11:30 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 11:30 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 11:30 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 11:30 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 11:30 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 11:30 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 11:30 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 11:30 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
@dscho dscho temporarily deployed to monitor-components April 20, 2022 14:31 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.