Skip to content

Conversation

@derrickstolee
Copy link

@derrickstolee derrickstolee commented Oct 30, 2021

Interesting things that happened:

  1. Aggressive refactors upstream caused some non-trivial compile issues (with some care needed to discover the new API).
  2. t0001 added a memory-leak check that doesn't work on every platform. I disabled it.
  3. The Scalar tests in t9099 started failing because they need to mock the background scheduler. Upstream work in this area might have disrupted the existing pattern for this.
  4. The Scalar functional tests ran a git add . that is now forbidden without the new --sparse option. See Scripts: add InstallFromSource.sh scalar#427 for the change to the functional tests. (And, the builds for microsoft/scalar needed updating to recent platform changes.)
  5. The build installers pipeline was broken due to the changes to derrickstolee/git_osx_installers and how FS Monitor requires more recent SDKs. That build is now updated.

Range-diff for -rc1-to--rc2 rebase:

  1:  0e35095d0b0 =   1:  f03828a346e reset --stdin: trim carriage return from the paths
  2:  fcfee2e0551 !   2:  9bb71ea0e20 gvfs: start by adding the -gvfs suffix to the version
    @@ GIT-VERSION-GEN
      #!/bin/sh
      
      GVF=GIT-VERSION-FILE
    --DEF_VER=v2.34.0-rc1
    +-DEF_VER=v2.34.0-rc2
     +DEF_VER=v2.34.0.vfs.0.0
      
      LF='
  3:  baa98be1037 =   3:  684c76d3105 gvfs: ensure that the version is based on a GVFS tag
  4:  3e080501a78 =   4:  863f0892b21 gvfs: add a GVFS-specific header file
  5:  6402782a0c0 =   5:  caa4d89012f gvfs: add the core.gvfs config setting
  6:  ef151a9d1e5 =   6:  b9909e4a2bf gvfs: add the feature to skip writing the index' SHA-1
  7:  c48e3eda513 =   7:  2409263fa47 gvfs: add the feature that blobs may be missing
  8:  0672dd526be =   8:  876b458babf gvfs: prevent files to be deleted outside the sparse checkout
  9:  abda1b6c187 =   9:  47aa52e48fb gvfs: optionally skip reachability checks/upload pack during fetch
 10:  bd5f23b03a6 =  10:  169791cab23 gvfs: ensure all filters and EOL conversions are blocked
 11:  5fdffc257fc =  11:  cff9867ce66 Add a new run_hook_strvec() function
 12:  bee9fcec812 =  12:  eece98932d0 gvfs: allow "virtualizing" objects
 13:  5b4d0f9ad40 =  13:  b34305d5350 Hydrate missing loose objects in check_and_freshen()
 14:  d191bc40d22 =  14:  dc3f00ca199 Add support for read-object as a background process to retrieve missing objects
 15:  abb2235035b =  15:  6b643b51d76 sha1_file: when writing objects, skip the read_object_hook
 16:  25cd1de64dc =  16:  f498eef9a09 gvfs: add global command pre and post hook procs
 17:  d915c6580c7 =  17:  ea90f191419 t0400: verify that the hook is called correctly from a subdirectory
 18:  91dbb228935 =  18:  e6cf27a009f Pass PID of git process to hooks.
 19:  4dfb6d589e6 =  19:  e43b3781bfd pre-command: always respect core.hooksPath
 20:  336a1eb530a =  20:  d2a24648012 sparse-checkout: update files with a modify/delete conflict
 21:  cd45d2c267a =  21:  ca0e4d19d26 sparse-checkout: avoid writing entries with the skip-worktree bit
 22:  83138091829 =  22:  66091049ebe Fix reset when using the sparse-checkout feature.
 23:  93c728dc320 =  23:  bc9b3badf68 Do not remove files outside the sparse-checkout
 24:  d2040dfa3f5 =  24:  9a6fa0caef4 gvfs: refactor loading the core.gvfs config value
 25:  ed06421f5a4 =  25:  7f70093df77 send-pack: do not check for sha1 file when GVFS_MISSING_OK set
 26:  45b37a45ab1 =  26:  e6e8cbfef5d cache-tree: remove use of strbuf_addf in update_one
 27:  2fcef4a42f8 =  27:  293dd363d04 gvfs: block unsupported commands when running in a GVFS repo
 28:  d35d52f01ae =  28:  183f54a8c9f gvfs: allow overriding core.gvfs
 29:  138a7ffccf0 =  29:  c39999f8561 BRANCHES.md: Add explanation of branches and using forks
 30:  9f862ea05c8 =  30:  51e0961adc1 Add virtual file system settings and hook proc
 31:  e52ed5defcb =  31:  b9ae4077ac8 Update the virtualfilesystem support
 32:  0941d8a2ad5 =  32:  a378bdc2a8b virtualfilesystem: don't run the virtual file system hook if the index has been redirected
 33:  ea9aa9cd020 =  33:  7d061b5000a virtualfilesystem: fix bug with symlinks being ignored
 34:  c15599428da =  34:  a4778f5d126 virtualfilesystem: check if directory is included
 35:  03d874686c7 =  35:  307d4e8c967 vfs: fix case where directories not handled correctly
 36:  fb83b78166c =  36:  ad5783dccac backwards-compatibility: support the post-indexchanged hook
 37:  adfa98e3c74 =  37:  3bbfd80c1f6 status: add status serialization mechanism
 38:  f13372b3e4a =  38:  85b8b1a030f Teach ahead-behind and serialized status to play nicely together
 39:  3423228454a =  39:  40c6f533ad1 status: serialize to path
 40:  cabd29d17ff =  40:  efa29e2f727 status: reject deserialize in V2 and conflicts
 41:  462c7f0a6e0 =  41:  881b7c6ea05 status: fix rename reporting when using serialization cache
 42:  6dbc130440b =  42:  125e3db12f6 serialize-status: serialize global and repo-local exclude file metadata
 43:  d97559e129f =  43:  16d26b2d4e4 status: deserialization wait
 44:  06b2cf9ee8b =  44:  10f22300f23 merge-recursive: avoid confusing logic in was_dirty()
 45:  0d584e0272f =  45:  8a8751450ec merge-recursive: add some defensive coding to was_dirty()
 46:  8269b8f8be7 =  46:  eddcacd82e2 merge-recursive: teach was_dirty() about the virtualfilesystem
 47:  48451df1112 =  47:  fcd75a1462d status: deserialize with -uno does not print correct hint
 48:  6103899dcbb =  48:  27976f44c62 wt-status-deserialize: fix crash when -v is used
 49:  9d604a1da27 =  49:  e2e5b044064 fsmonitor: check CE_FSMONITOR_VALID in ce_uptodate
 50:  7f8eb0cc743 =  50:  da9ed6569c2 fsmonitor: add script for debugging and update script for tests
 51:  8ad90b9b7b2 =  51:  f81530d118e status: disable deserialize when verbose output requested.
 52:  002e2bd6b19 =  52:  1c08a584e6e t7524: add test for verbose status deserialzation
 53:  3f161764fcd =  53:  625c6e8aec8 deserialize-status: silently fallback if we cannot read cache file
 54:  d206c45b084 =  54:  cf34e5303bc gvfs:trace2:data: add trace2 tracing around read_object_process
 55:  c5a7ecfa457 =  55:  70e205effc0 gvfs:trace2:data: status deserialization information
 56:  db27a0aa412 =  56:  dd184c0b77c gvfs:trace2:data: status serialization
 57:  1da87216b4f =  57:  aab09162653 gvfs:trace2:data: add vfs stats
 58:  201d11f985d =  58:  f98197cb89a trace2: refactor setting process starting time
 59:  60ae6eba989 =  59:  3c60d9d3783 trace2:gvfs:experiment: clear_ce_flags_1
 60:  468587cc9c9 =  60:  f1b90939ad8 trace2:gvfs:experiment: report_tracking
 61:  a48741d6cc6 =  61:  5b997bdd242 trace2:gvfs:experiment: read_cache: annotate thread usage in read-cache
 62:  771b7808bbd =  62:  bee35578b45 trace2:gvfs:experiment: read-cache: time read/write of cache-tree extension
 63:  7bc6b677c7d =  63:  8b541380da1 cache-tree: use `r` instead of `the_repository` in Trace2
 64:  4ed92a6a856 =  64:  f4c66f293f9 trace2:gvfs:experiment: add region to apply_virtualfilesystem()
 65:  0d631fa4383 =  65:  777fd677664 trace2:gvfs:experiment: add region around unpack_trees()
 66:  650003a02f9 =  66:  f4db380d11f trace2:gvfs:experiment: add region to cache_tree_fully_valid()
 67:  0fbff1528c0 =  67:  8d44077c8ff trace2:gvfs:experiment: add unpack_entry() counter to unpack_trees() and report_tracking()
 68:  7013f4a41cc =  68:  3fd9c3038df trace2:gvfs:experiment: increase default event depth for unpack-tree data
 69:  0d9399aa9e8 =  69:  8d0a3e47c6a trace2:gvfs:experiment: add data for check_updates() in unpack_trees()
 70:  d63776304bd =  70:  35ad62991a5 Trace2:gvfs:experiment: capture more 'tracking' details
 71:  3b3b956f168 =  71:  007cfd864f1 credential: set trace2_child_class for credential manager children
 72:  08d3fa4a0d7 =  72:  81bc4ccb131 sub-process: do not borrow cmd pointer from caller
 73:  436afcd8646 =  73:  7877c518d0b sub-process: add subprocess_start_argv()
 74:  5feb6f29147 =  74:  b7c43cbab0f sha1-file: add function to update existing loose object cache
 75:  7a12dcc9850 =  75:  7901abd80fd packfile: add install_packed_git_and_mru()
 76:  8b57e2cd3bb =  76:  a49671e6aec index-pack: avoid immediate object fetch while parsing packfile
 77:  4a306966b8c =  77:  e9e6d211723 gvfs-helper: create tool to fetch objects using the GVFS Protocol
 78:  ba58dd1503a =  78:  a857880d90d gvfs-helper: fix race condition when creating loose object dirs
 79:  27d0312868d =  79:  af8a0abc8f3 sha1-file: create shared-cache directory if it doesn't exist
 80:  746a0ead9d8 =  80:  d4c29ab7105 gvfs-helper: better handling of network errors
 81:  bd29fd3e3f6 =  81:  58a50312e8e gvfs-helper-client: properly update loose cache with fetched OID
 82:  1cbc7523ba0 =  82:  b905d0fc42f gvfs-helper: V2 robust retry and throttling
 83:  529ff7603da =  83:  de6a134f814 gvfs-helper: expose gvfs/objects GET and POST semantics
 84:  7e7869bd2a0 =  84:  ae373f9e649 gvfs-helper: dramatically reduce progress noise
 85:  d1a748779c2 =  85:  6f35e091133 gvfs-helper-client.h: define struct object_id
 86:  35caafe4f71 =  86:  680070c12df gvfs-helper: handle pack-file after single POST request
 87:  70572e54807 =  87:  d023bfadf66 test-gvfs-prococol, t5799: tests for gvfs-helper
 88:  c47c566be2d =  88:  0e59cff1b1f gvfs-helper: move result-list construction into install functions
 89:  fb9cea528a8 =  89:  8716559e963 t5799: add support for POST to return either a loose object or packfile
 90:  c31b6fed027 =  90:  6c00f01a148 t5799: cleanup wc-l and grep-c lines
 91:  365647374ae =  91:  6073d9b8b8c gvfs-helper: verify loose objects after write
 92:  86c79f94b6f =  92:  a9357e732bf t7599: create corrupt blob test
 93:  52f615a9f1e =  93:  fb16db410c0 gvfs-helper: add prefetch support
 94:  e68d9ceb74c =  94:  01414dc0ff0 gvfs-helper: add prefetch .keep file for last packfile
 95:  cf686f751db =  95:  48c57fa7bde gvfs-helper: do one read in my_copy_fd_len_tail()
 96:  8dd134595d2 =  96:  fea3cb1692c gvfs-helper: move content-type warning for prefetch packs
 97:  88bebd91b22 =  97:  e8787e6cc52 fetch: use gvfs-helper prefetch under config
 98:  e5f13af3f1a =  98:  3c181b5dcb0 gvfs-helper: better support for concurrent packfile fetches
 99:  57254485c77 =  99:  1a1cc7eef84 remote-curl: do not call fetch-pack when using gvfs-helper
100:  530d71cdc38 = 100:  44700ec450d fetch: reprepare packs before checking connectivity
101:  da462976fae = 101:  29c6f2ed5e3 gvfs-helper: retry when creating temp files
102:  3af9cb410cd = 102:  5487fd9238c upload-pack: fix race condition in error messages
103:  74b63cab987 = 103:  068fa86de6b homebrew: add GitHub workflow to release Cask
104:  26cf4d572a7 = 104:  6e5319d1433 maintenance: care about gvfs.sharedCache config
105:  3f1059d753c = 105:  8b6606894a7 unpack-trees:virtualfilesystem: Improve efficiency of clear_ce_flags
106:  ed5c670e22e ! 106:  d731ecaebd0 Adding winget workflows
    @@ .github/workflows/release-winget.yml (new)
     +    steps:
     +    - id: update-winget
     +      name: Update winget repository
    -+      uses: mjcheetham/update-winget@v1.4
    ++      uses: mjcheetham/update-winget@v1.4.1
     +      with:
     +        id: Microsoft.Git
     +        token: ${{ secrets.WINGET_TOKEN }}
107:  0018d17adbb = 107:  cf514f49088 update-microsoft-git: create barebones builtin
108:  d0e1a7abce9 = 108:  c301c97ba77 update-microsoft-git: Windows implementation
109:  0ea62f84f1f = 109:  e1284ebe26d update-microsoft-git: use brew on macOS
110:  2bce5329a14 = 110:  82608609111 Adding readme for microsoft/git
111:  53474882406 = 111:  e06d1ac7e9a t1092: mark passing test as success
112:  a2bea574a71 = 112:  091ba4090fd ci: run Scalar's Functional Tests
113:  d75d8281112 = 113:  be64f6096cc Start porting `scalar.exe` to C
114:  4e66347df60 = 114:  3483a33844a scalar: add a test script
115:  27d7f65e73d ! 115:  e31d1a04249 scalar register: set recommended config settings
    @@ contrib/scalar/scalar.c
     +		{ "commitGraph.generationVersion", "1" },
     +		{ "core.autoCRLF", "false" },
     +		{ "core.safeCRLF", "false" },
    ++		{ "fetch.showForcedUpdates", "false" },
     +		{ "maintenance.gc.enabled", "false" },
     +		{ "maintenance.prefetch.enabled", "true" },
     +		{ "maintenance.prefetch.auto", "0" },
116:  52e6918cf2f = 116:  01f3fc42e96 scalar register/unregister: start/stop maintenance on repository
117:  8b2e181be2c = 117:  0cb0a1d7e19 scalar: implement 'scalar list'
118:  bec2daeb141 = 118:  abefbab19bf scalar unregister: handle deleted enlistment directory gracefully
119:  36689d657de = 119:  6c21092404d scalar: implement the `clone` subcommand
120:  7c8c7bc0b61 = 120:  153b98982c5 scalar: test `scalar clone`
121:  e301d2f4e77 = 121:  b8656ddce81 scalar clone: suppress warning about `init.defaultBranch`
122:  fad7e4e12d4 = 122:  a45ba350431 scalar clone: respect --single-branch
123:  498a7912cc4 = 123:  80d4a2c530a scalar: implement the `run` command
124:  6b05c7f6cba = 124:  a205b0bb7f0 scalar: allow reconfiguring an existing enlistment
125:  09e8ffa061f = 125:  530356f9312 scalar reconfigure: optionally handle all registered enlistments
126:  9eb663a6200 = 126:  1efd30b513a scalar: support the `config` command for backwards compatibility
127:  22f52750196 = 127:  98474c37855 Implement `scalar diagnose`
128:  6711a57c81a = 128:  67d960159a1 scalar diagnose: include disk space information
129:  d0ea16cf812 = 129:  6a1f26ee9b2 scalar: teach `diagnose` to gather packfile info
130:  9426b69b465 = 130:  41f0f850da5 scalar: teach `diagnose` to gather loose objs info
131:  1311dc9d2b8 = 131:  4c0275ea06c scalar diagnose: show a spinner while staging content
132:  76cc65c0d5f = 132:  794c744c812 scalar: implement the `delete` command
133:  d8cc4840d2d = 133:  997ba790dc5 scalar: implement the `version` command
134:  4d2c3b0b7e7 = 134:  4bf29ce2fae scalar: accept -C and -c options before the subcommand
135:  1ed958a3ced = 135:  58a414e7cbc scalar: enable built-in FSMonitor on `register`
136:  086917b10df = 136:  58a6f68cff1 scalar unregister: stop FSMonitor daemon
137:  2d3fe9a2a4f = 137:  c21c43562ea scalar: start documenting the command
138:  3a0d93e89a3 = 138:  bbb02860099 scalar: document the `clone` subcommand
139:  ec40a123e10 = 139:  bbb0afb8c2f scalar: document `list`, `register` and `unregister`
140:  d0bfc5f9705 = 140:  c682595bfb2 scalar: document the remaining subcommands
141:  2ffc82132fd = 141:  ea6b6b3e0a8 git_config_set_multivar_in_file_gently(): add a lock timeout
142:  b73486088e8 = 142:  c61f943bc78 scalar: set the config write-lock timeout to 150ms
143:  c2f5de39453 = 143:  195c8ac9b21 git help: special-case `scalar`
144:  aa595679c42 = 144:  8f4cd9bb7ca scalar: implement the `help` subcommand
145:  1bf3204bfa2 = 145:  2faf544f881 Optionally include `scalar` when building/testing Git
146:  331e3e84a7f = 146:  2c18e38c936 NOT-TO-UPSTREAM: ci: build `scalar.exe`, too
147:  030b0b2c742 = 147:  0f1b2d73371 ci(windows): also run `scalar` tests
148:  567ed716578 = 148:  d9ff34f4862 scalar: implement a minimal JSON parser
149:  f229ac028a4 = 149:  431266dd154 scalar clone: support GVFS-enabled remote repositories
150:  52dc7dab4ef = 150:  ac706e33726 test-gvfs-protocol: also serve smart protocol
151:  929bf249310 = 151:  0ff54ab77a2 gvfs-helper: add the `endpoint` command
152:  94264238c05 = 152:  187af8e575c dir_inside_of(): handle directory separators correctly
153:  36d9b26d5b9 = 153:  bbb01618cf7 scalar: disable authentication in unattended mode
154:  2a73d336839 = 154:  510c02ec9af scalar: do initialize `gvfs.sharedCache`
155:  83970ebd5e6 = 155:  c6819efc248 scalar diagnose: include shared cache info
156:  8f501605207 = 156:  a4c9e99d9a9 scalar: only try GVFS protocol on https:// URLs
157:  0ef3cbd8aab = 157:  92e97598470 scalar: verify that we can use a GVFS-enabled repository
158:  a8176eecfc7 = 158:  6c8dd384513 scalar: add the `cache-server` command
159:  f6263b35192 = 159:  caa680598aa scalar: add a test toggle to skip accessing the vsts/info endpoint
160:  d057b2689e6 = 160:  2f5fc0c52bb ci: run Scalar functional tests for PRs against features/*
161:  80f183f436b = 161:  3194fd78ff5 scalar: use microsoft/scalar:main for tests
162:  b0fe2ec9db9 = 162:  00688eca928 scalar: add docs from microsoft/scalar
163:  4df344ec08c = 163:  35bcf211caa scalar: add retry logic to run_git()
164:  8183f4f4b40 = 164:  47184358c7d scalar: only retry a full clone if not using GVFS protocol
165:  f7d9a87cb7e = 165:  30804efe65c gvfs: disable the built-in FSMonitor
166:  56458111143 = 166:  d1045efd6ea Add workflow for apt-get release
167:  7fde6376f03 = 167:  74ef5349950 add/rm: allow adding sparse entries when virtual
168:  69c2a40e8f7 = 168:  fa994b1259e release: create initial Windows installer build workflow
169:  eb09c113614 = 169:  5e388c2f4cf release: add Mac OSX installer build
170:  b83cdfc6d68 = 170:  dcde9314148 release: build unsigned Ubuntu .deb package
171:  89efbc68ac3 = 171:  067be545025 release: add signing step for .deb package
172:  78fa315d456 = 172:  f5e034ff226 release: create draft GitHub release with packages & installers
174:  09e4d73f2ea = 173:  964ad1cb3cf release: continue pestering until user upgrades
173:  32f31460bb2 = 174:  cc9652a304d sparse-checkout: add config to disable deleting dirs
175:  7b6eef77454 = 175:  315ccee4dc0 diff: ignore sparse paths in diffstat
176:  dfb466b80c3 = 176:  591d40d4a7a Makefile: disable cURL warnings on gvfs-helper.c
177:  082c3f0a9f4 = 177:  f498339f4e5 merge-ort: expand only for out-of-cone conflicts
178:  ce985c1877a = 178:  bd501dfeffe merge-ort: ignore skip-worktree bit with virtual filesystem
179:  3e3d39b8fdf = 179:  da502827000 t7524: test no longer fails
180:  20e2f533e5d = 180:  e6064a6e440 repo-settings: enable sparse index by default
182:  6887ae40108 = 181:  aa80b4d252d sparse-index: create expand_to_pattern_list()
183:  3ba6ea70395 = 182:  0c7b805e6de dir: add path_matches_cone_mode_pattern_list()
184:  1201902a54d = 183:  78c640a1284 sparse-index: introduce partially-sparse indexes
185:  f0d3e09893a = 184:  5cb2339d905 cache-tree: implement cache_tree_find_path()
187:  df0c60a48db = 185:  24ea91764be sparse-checkout: --no-sparse-index needs a full index
189:  3dc97d8ec11 = 186:  614715c663d sparse-index: partially expand directories
192:  6cda1a9c516 = 187:  c03558c92f5 sparse-index: complete partial expansion
195:  fb380c16aab = 188:  b0613b333ca sparse-checkout: integrate with sparse index
186:  30c9fe1172a = 189:  c4bc7761f14 reset: add test demonstrating mixed reset outside sparse checkout
188:  9c55e267c54 = 190:  6e27353c1cc reset: expand test coverage in sparse checkout
190:  3101e4f19b8 = 191:  db4ed004c9e sparse-index: update command for expand/collapse test
191:  a3f75bd6fb0 = 192:  45c7a11db43 scalar: enable untracked cache unconditionally
193:  33efd8f3f83 = 193:  3d48f834433 sparse-index: integrate with reset
194:  125b622519b = 194:  aa7ff244340 Use GIT_FORCE_UNTRACKED_CACHE in functional tests
196:  9637ac7b5f6 = 195:  56d18841429 sparse-index: make non-mixed `reset` sparse-aware
197:  71d1275c674 = 196:  dd579104582 dir: force untracked cache with core.untrackedCache
198:  6a7f71e9628 = 197:  da2cfcd2a9f sparse-index: make mixed `reset` sparse-aware
199:  20180b7d4a7 = 198:  64ae1e12f35 update-index (bugfix): `--cacheinfo` should block directories
200:  71729ce6cc9 = 199:  f97b6f6e2ce update-index: add tests for sparse-checkout compatibility
201:  36461c778e8 = 200:  fb662e997b1 diff: enable and test the sparse index
202:  1395803f7c4 = 201:  65d64744ec0 update-index: integrate with sparse index
203:  76510f71779 = 202:  2c0563ca96c update-index: remove sparse index expansion for --cacheinfo
204:  49a538a97bb = 203:  d9e75508e38 p2000: explicitly turn off sparse index
205:  a1500a64d08 = 204:  6332a0c9d75 update-index: remove unnecessary index expansion in do_reupdate
206:  a1f15e7efbd = 205:  0bcf0d74110 p2000: add new commands
207:  fc7cae41af0 = 206:  ae35beccdce checkout-index: expand sparse checkout compatibility tests
208:  6f3cc132204 = 207:  7556b771ead checkout-index: add `--sparse` option
209:  b9b9a9a2341 = 208:  eadfc6a73df checkout-index: integrate with sparse index
210:  b4524a4211c = 209:  7882a73258d checkout-index: improve `ensure_full_index` scope in `checkout_all`
211:  45c124e1ad2 = 210:  c7d86858c6d checkout-index: add performance test for `checkout-index --all`
212:  db085718246 = 211:  f7a1dbbdb07 read-tree: add performance test in p2000
213:  8bfb703d9cf = 212:  55edcf67d88 read-tree: expand sparse checkout test coverage
214:  d00303d0e52 = 213:  742b0229317 status: bugfix directory diff in sparse index
215:  11fb3db18be = 214:  61310fabb4e read-tree: integrate with sparse index
216:  3ecff62c669 = 215:  005b925f92f read-tree: narrow scope of index expansion for `--prefix`
217:  b7411c067f5 = 216:  35a6e2576e1 p2000: add performance test for `git stash`
218:  803a6628b7c = 217:  b84d7fee049 stash: integrate with sparse index
219:  c3f3f167aee = 218:  b4a3eb01209 merge-recursive: add merge function arg to `merge_recursive_generic`
220:  de315e3c74e = 219:  8ef18c7b931 stash: use merge-ort rather than merge-recursive
221:  f4af6d53ac8 = 220:  c6eb2a56a59 unpack-trees: improve performance of `next_cache_entry`
222:  307ee2bf8f6 = 221:  af1a3d50284 clean: integrate with sparse index
223:  877dcdd8067 = 222:  f775bfc93e7 stash: expand testing for `git stash -u`
181:  2f116a7880e = 223:  87fd978ad67 sequencer: avoid progress when stderr is redirected
224:  15f101e2dbf = 224:  87cd21dc3c2 unpack-trees: expand conditions for sparse result index
225:  0bd5d257567 = 225:  2d6b0c3cb70 checkout-index: perform lazy index expansion for `--sparse`
226:  c634642cecd = 226:  8f9a8fb215a stash: move sparse index test for `stash -u`
227:  40fc9285a09 = 227:  162f6b41b73 blame: enable and test the sparse index
228:  d0dbbe6cef4 = 228:  8d114645ada fixup! t1092: test interesting sparse-checkout scenarios
229:  a670cd08b92 = 229:  eb73c96f5ac update-microsoft-git: interface with apt-get on Linux
230:  fabcc6eba7d = 230:  38f75c4ac28 reset: rename is_missing to !is_in_reset_tree
231:  d5795befd78 = 231:  157463e0b54 reset: preserve skip-worktree bit in mixed reset
232:  53b55bcb125 = 232:  5a3a4b99373 fixup! reset: expand test coverage for sparse checkouts
233:  92c58047877 = 233:  8f6ffadf368 sparse-index: fix index.sparse inline usage
234:  162e4457b32 = 234:  bdbd7d2ef1a fetch/pull: use the sparse index
235:  2f87ebe2050 = 235:  e250665390e sparse: add vfs-specific precautions
236:  d52e0f6e082 = 236:  b112b02216f t0001: drop memory-leak check
237:  bb89a23af77 = 237:  242f5eb4585 t9099: mock out scheduler with GIT_TEST_MAINT_SCHEDULER
238:  c331e5b10ec <   -:  ----------- fixup! scalar register: set recommended config settings
239:  8f650b61617 <   -:  ----------- fixup! Adding winget workflows

@dscho
Copy link
Member

dscho commented Oct 31, 2021

Annotated range-diff:

This is relative to vfs-2.33.0, right? To be honest, I would find the range-diff relative to cleaned-up/vfs-2.33.0 more informative (that latter branch already has all the fixup!s and squash!es applied, and is tree-same to vfs-2.33.0).

179:  8ea0db86758 ! 170:  e3f076c534a gvfs: disable the built-in FSMonitor
    @@ Commit message
     
         Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
     
    - ## fsmonitor-ipc.c ##
    -@@
    - #include "cache.h"
    -+#include "config.h"
    - #include "fsmonitor.h"
    - #include "simple-ipc.h"
    - #include "fsmonitor-ipc.h"
    -@@
    - 
    - int fsmonitor_ipc__is_supported(void)
    - {
    -+	if (git_config_get_virtualfilesystem())
    -+		return 0;
    - 	return 1;
    - }
    - 
    -
    - ## fsmonitor-settings.c ##
    -@@ fsmonitor-settings.c: static void lookup_fsmonitor_settings(struct repository *r)
    - 
    - enum fsmonitor_mode fsm_settings__get_mode(struct repository *r)
    - {
    -+	if (git_config_get_virtualfilesystem())
    -+		return FSMONITOR_MODE_INCOMPATIBLE;
    -+
    - 	if (!r->settings.fsmonitor)
    - 		lookup_fsmonitor_settings(r);
    - 
    -
      ## t/t1093-virtualfilesystem.sh ##
     @@ t/t1093-virtualfilesystem.sh: test_expect_success 'folder with same prefix as file' '
      	test_cmp expected actual
      '
      
    -+test_expect_success 'virtualfilsystem hook disables built-in FSMonitor ' '
    ++test_expect_success MINGW,FSMONITOR_DAEMON 'virtualfilsystem hook disables built-in FSMonitor ' '
     +	clean_repo &&
     +	test_config core.usebuiltinfsmonitor true &&
     +	write_script .git/hooks/virtualfilesystem <<-\EOF &&
  
Updated with latest FS Monitor version.

I am not sure that we can drop those hunks without equivalent replacements: FSMonitor should be disabled in virtualfilesystems.

    ++		if (!include_sparse && !core_virtualfilesystem &&

TBH I was wondering whether I should have fixed the merge conflict via (!include_sparse || !core_virtualfilsystem) instead (I still haven't wrapped my head around this..., and there is another similarly resolved merge conflict in that commit). @derrickstolee what do you think?

About those failing Scalar Functional Tests (e.g. this one), I have honestly no idea what to make of the error messages...

@derrickstolee
Copy link
Author

Updated with latest FS Monitor version.

I am not sure that we can drop those hunks without equivalent replacements: FSMonitor should be disabled in virtualfilesystems.

I think I investigated this and found that there were other places where we disabled it, now that FS Monitor is updated to a new version. However, I'll make sure before -rc1. Right now I'm focused on rc0 for the bug bash but can't validate anything with VFS for Git because of a build issue over there.

    ++		if (!include_sparse && !core_virtualfilesystem &&

TBH I was wondering whether I should have fixed the merge conflict via (!include_sparse || !core_virtualfilsystem) instead (I still haven't wrapped my head around this..., and there is another similarly resolved merge conflict in that commit). @derrickstolee what do you think?

There are many reasons why we would choose to not care if the cache entry has SKIP_WORKTREE. One reason is that --sparse was provided (include_sparse) another is if we are in a VFS for Git codebase. So we really want !(include_sparse || core_virtualfilesystem) and DeMorgan's law gives us the same as in the commit.

About those failing Scalar Functional Tests (e.g. this one), I have honestly no idea what to make of the error messages...

There was some movement in the background maintenance that adjusted how the scheduler was mocked. I updated the environment variables in the script in a new commit at the end (it is not in the range-diff yet).

@dscho
Copy link
Member

dscho commented Nov 1, 2021

About those failing Scalar Functional Tests (e.g. this one), I have honestly no idea what to make of the error messages...

There was some movement in the background maintenance that adjusted how the scheduler was mocked. I updated the environment variables in the script in a new commit at the end (it is not in the range-diff yet).

You were referring to t9099, right? I meant Scalar's Functional Test suite.

FWIW I investigated locally and figured out that the GIT_TEST_MAINT_SCHEDULER variable needs to be assigned after sourcing test-lib.sh, and there was already an assignment, so I added a commit that extends that assignment. Now all tests pass (including Scalar's Functional Tests...).

@vdye
Copy link

vdye commented Nov 4, 2021

@derrickstolee On your next rebase, could you edit the commit message in be332d8 to backtick my and @ldennington's user tags?

- Cc: @vdye and @ldennington to get a (possibly overwhelming?) taste of sparse-index stuff. If you focus solely on the `git merge` commits you'll get a feel for what a sparse index integration looks like.
+ Cc: `@vdye` and `@ldennington` to get a (possibly overwhelming?) taste of sparse-index stuff. If you focus solely on the `git merge` commits you'll get a feel for what a sparse index integration looks like.

@derrickstolee derrickstolee force-pushed the tentative/vfs-2.34.0 branch 3 times, most recently from 401a01e to 242f5eb Compare November 10, 2021 01:59
@dscho
Copy link
Member

dscho commented Nov 15, 2021

We should probably squash 3194fd7 and 2f5fc0c into 091ba40 before closing this PR.

Ben Peart and others added 17 commits November 15, 2021 12:26
…ng objects

This commit converts the existing read_object hook proc model for
downloading missing blobs to use a background process that is started
the first time git encounters a missing blob and stays running until git
exits.  Git and the read-object process communicate via stdin/stdout and
a versioned, capability negotiated interface as documented in
Documentation/technical/read-object-protocol.txt.  The advantage of this
over the previous hook proc is that it saves the overhead of spawning a
new hook process for every missing blob.

The model for the background process was refactored from the recent git
LFS work.  I refactored that code into a shared module (sub-process.c/h)
and then updated convert.c to consume the new library.  I then used the
same sub-process module when implementing the read-object background
process.

The read-object hook feature was designed before the SHA-256 support was
even close to be started. As a consequence, its protocol hard-codes the
key `sha1`, even if we now also support SHA-256 object IDs.

Technically, this is wrong, and probably the best way forward would be
to rename the key to `oid` (or `sha256`, but that is less future-proof).

However, there are existing setups out there, with existing read-object
hooks that most likely have no idea what to do with `oid` requests. So
let's leave the key as `sha1` for the time being, even if it will be
technically incorrect in SHA-256 repositories.

Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>
We found a user who had set "core.gvfs = false" in their global
config. This should not have been necessary, but it also should not
have caused a problem. However, it did.

The reason is that gvfs_load_config_value() is called from config.c
when reading config key/value pairs from all the config files. The
local config should override the global config, and this is done by
config.c reading the global config first then reading the local
config. However, our logic only allowed writing the core_gvfs
variable once.

Put the guards against multiple assignments of core_gvfs into
gvfs_config_is_set() instead, because that will fix the problem
_and_ keep multiple calls to gvfs_config_is_set() from slowing down.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
The vfs does not correctly handle the case when there is a file
that begins with the same prefix as a directory. For example, the
following setup would encounter this issue:

    A directory contains a file named `dir1.sln` and a directory
    named `dir1/`.

    The directory `dir1` contains other files.

    The directory `dir1` is in the virtual file system list

The contents of `dir1` should be in the virtual file system, but
it is not. The contents of this directory do not have the skip
worktree bit cleared as expected. The problem is in the
`apply_virtualfilesystem(...)` function where it does not include
the trailing slash of the directory name when looking up the
position in the index to start clearing the skip worktree bit.

This fix is it include the trailing slash when finding the first
index entry from `index_name_pos(...)`.
Verify that `git status --deserialize=x -v` does not crash and
generates the same output as a normal (scanning) status command.

These issues are described in the previous 2 commits.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
If we are going to write an object there is no use in calling
the read object hook to get an object from a potentially remote
source.  We would rather just write out the object and avoid the
potential round trip for an object that doesn't exist.

This change adds a flag to the check_and_freshen() and
freshen_loose_object() functions' signatures so that the hook
is bypassed when the functions are called before writing loose
objects. The check for a local object is still performed so we
don't overwrite something that has already been written to one
of the objects directories.

Based on a patch by Kevin Willford.

Signed-off-by: Johannes Schindelin <johasc@microsoft.com>
When our patches to support that hook were upstreamed, the hook's name
was eliciting some reviewer suggestions, and it was renamed to
`post-index-change`. These patches (with the new name) made it into
v2.22.0.

However, VFSforGit users may very well have checkouts with that hook
installed under the original name.

To support this, let's just introduce a hack where we look a bit more
closely when we just failed to find the `post-index-change` hook, and
allow any `post-indexchanged` hook to run instead (if it exists).
Teach Git to not throw a fatal error when an explicitly-specified
status-cache file (`git status --deserialize=<foo>`) could not be
found or opened for reading and silently fallback to a traditional
scan.

This matches the behavior when the status-cache file is implicitly
given via a config setting.

Note: the current version causes a test to start failing. Mark this as
an expected result for now.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Teach subprocess_start() to use a copy of the passed `cmd` string
rather than borrowing the buffer from the caller.

Some callers of subprocess_start() pass the value returned from
find_hook() which points to a static buffer and therefore is only
good until the next call to find_hook().  This could cause problems
for the long-running background processes managed by sub-process.c
where later calls to subprocess_find_entry() to get an existing
process will fail.  This could cause more than 1 long-running
process to be created.

TODO Need to confirm, but if only read_object_hook() uses
TODO subprocess_start() in this manner, we could drop this
TODO commit when we drop support for read_object_hook().

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Add function to start a subprocess with an argv.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Create a function to add a new object to the loose object cache
after the existing odb/xx/ directory was scanned.

This will be used in a later commit to keep the loose object
cache fresh after dynamically fetching an individual object
and without requiring the odb/xx/ directory to be rescanned.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Create a function to install a new packfile into the packed-git
list and add it to the head of the MRU list.

This function will be used in a later commit to install packfiles
created by dynamic object fetching.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Add trace2 region around read_object_process to collect
time spent waiting for missing objects to be dynamically
fetched.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Prevent packfile parsing from accidentally dynamically fetching
each individual object found in the packfile.

When index-pack parses the input packfile, it does a lookup in the
ODB to test for conflicts/collisions.  This can accidentally cause
the object to be individually fetched when gvfs-helper (or
read-object-hook or partial-clone) is enabled.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Add trace2 region and data events describing attempts to deserialize
status data using a status cache.

A category:status, label:deserialize region is pushed around the
deserialize code.

Deserialization results when reading from a file are:
    category:status, path   = <path>
    category:status, polled = <number_of_attempts>
    category:status, result = "ok" | "reject"

When reading from STDIN are:
    category:status, path   = "STDIN"
    category:status, result = "ok" | "reject"

Status will fallback and run a normal status scan when a "reject"
is reported (unless "--deserialize-wait=fail").

If "ok" is reported, status was able to use the status cache and
avoid scanning the workdir.

Additionally, a cmd_mode is emitted for each step: collection,
deserialization, and serialization.  For example, if deserialization
is attempted and fails and status falls back to actually computing
the status, a cmd_mode message containing "deserialize" is issued
and then a cmd_mode for "collect" is issued.

Also, if deserialization fails, a data message containing the
rejection reason is emitted.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Create gvfs-helper.  This is a helper tool to use the GVFS Protocol
REST API to fetch objects and configuration data from a GVFS cache-server
or Git server.  This tool uses libcurl to send object requests to either
server.  This tool creates loose objects and/or packfiles.

Create gvfs-helper-client.  This code resides within git proper and
uses the sub-process API to manage gvfs-helper as a long-running background
process.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
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.

9 participants