Skip to content

Conversation

@dscho
Copy link
Member

@dscho dscho commented Nov 5, 2025

This is not meant to be released, but it will make the subsequent -rc1, -rc2 and final rebases substantially easier.

dscho and others added 19 commits November 5, 2025 14:04
…fter release

As pointed out by CodeQL, it is a potentially dangerous practice to
store local variables' addresses in non-local structs.

My original intention was to make sure to clear it out after it was
used, and before the function returns (which is when the address would
go stale).

However, I faced too much resistance in the Git project against such
patches, there seemed to always be the overwhelming sentiment that the
code isn't broken (even if it requires a complex and demanding analysis
to wrap one's head around _that_). Therefore, I will be pragmatic and
simply ask CodeQL to hold its peace about this issue forever.

Signed-off-by: Johannes Schindelin <[email protected]>
As pointed out by CodeQL, it could be NULL and we usually check for
that.

Signed-off-by: Johannes Schindelin <[email protected]>
On the off-chance that it's NULL...

Signed-off-by: Johannes Schindelin <[email protected]>
As pointed out by CodeQL, `lookup_commit()` can return NULL.

Signed-off-by: Johannes Schindelin <[email protected]>
CodeQL points out that `branch_get()` can return NULL values.

Signed-off-by: Johannes Schindelin <[email protected]>
The code is a bit too hard to reason about for CodeQL to figure out
whether the `fill_commit_graph_info()`  function is at all called after
`write_commit_graph()` returns (and hence whether `topo_levels` goes out
of context before it is used again).

The Git project insists that this is correct (and does not want to make
the code more obviously correct), so let's silence CodeQL's complaints
in this instance.

Signed-off-by: Johannes Schindelin <[email protected]>
CodeQL is GitHub's native offering of a static code analyzer, and hence
integrates with GitHub Actions better than any other static code
analyzer.

By default, it comes with a large range of "queries" that test for
common code patterns that should be avoided.

For now, we only target source code written in C, via the `language:
cpp` directive. Just in case that other languages should be targeted,
too, this GitHub workflow job is set up as a matrix job to make that
easier in the future.

For full documentation, see
https://docs.github.com/en/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql

Co-authored-by: Pierre Tempel <[email protected]>
Co-authored-by: Arthur Baars <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
In some instances, CodeQL's web UI on github.com leaves questions
unanswered. For example, in some alerts it is really necessary to follow
the entire "taint flow" to understand why something might be an issue.

The alerts for the `cpp/uncontrolled-allocation-size` rule, for example,
are all false positives, and only when inspecting the exact flow does it
become obvious that one alert wants to point out that the size of a
binary patch hunk, which is specified in the patch, is then used to
determine how much memory to allocate, which may potentially run out of
memory (and is hence just Git doing what it is asked to, and does not
need to be changed).

To help with those issues, publish the `.sarif` file as part of every
workflow run; This allows downloading that file and inspecting it e.g.
with the SARIF viewer extension in VS Code (for details, see
https://marketplace.visualstudio.com/items?itemName=MS-SarifVSCode.sarif-viewer).

Signed-off-by: Johannes Schindelin <[email protected]>
A couple of CodeQL's queries are opinionated in a way that is obviously
not shared by Git's source code's state, and apparently intentionally so.

For example, the "For loop variable changed in body" query as well as
the "No trivial switch statements" one result in too many results that
are apparently intentional in Git's source code. Let's not worry about
those, then. Also, Git has plenty of instances where variables shadow
other variables.

Other valid yet not quite critical issues identified by CodeQL include
complex conditionals and nested switch statements spanning several
pages.

We probably want to address these issues at some stage, but they are not
as critical as other problems pointed out by CodeQL, so let's silence
those queries for now and take care of them at a later stage.

Signed-off-by: Johannes Schindelin <[email protected]>
…oes NUL-terminate correctly

Signed-off-by: Johannes Schindelin <[email protected]>
A few places where CodeQL thinks that variables might be uninitialized.

Signed-off-by: Johannes Schindelin <[email protected]>
Let's exclude GitWeb from being scanned; It is not distributed by us.

Signed-off-by: Johannes Schindelin <[email protected]>
These patches implement some defensive programming to address complaints
some static analyzers might have.

Signed-off-by: Johannes Schindelin <[email protected]>
CodeQL pointed out a couple of issues, which are addressed in this patch
series.

Signed-off-by: Johannes Schindelin <[email protected]>
This patch series has been long in the making, ever since Johannes
Nicolai and myself spiked this in November/December 2020.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho self-assigned this Nov 5, 2025
@dscho

This comment was marked as outdated.

jeffhostetler and others added 9 commits November 6, 2025 08:24
Computing `git name-rev` on each commit, tree, and blob in each
of the various large_item_vec can be very expensive if there are
too many refs, especially if the user doesn't need the result.
Lets make it optional.

The `--no-name-rev` option can save 50 calls to `git name-rev`
since we have 5 large_item_vec's and each defaults to 10 items.

Signed-off-by: Jeff Hostetler <[email protected]>
This topic branch brings in a new, experimental built-in command to
assess the dimensions of a local repository.

It is experimental and subject to change! It might grow new options,
change its output, or even be moved into `git diagnose --analyze` or
something like that.

The hope is that this command, which was inspired by `git sizer`
(https://github.com/github/git-sizer), will be helpful not only in
diagnosing issues with large repositories, but also in modeling what
shapes and sizes of repositories can be handled by Git (and as a
corollary: where Git needs to improve to be able to accommodate the
natural growth of repositories).

Signed-off-by: Johannes Schindelin <[email protected]>
While using the reset --stdin feature on windows path added may have a
\r at the end of the path that wasn't getting removed so didn't match
the path in the index and wasn't reset.

Signed-off-by: Kevin Willford <[email protected]>
It has been a long-standing practice in Git for Windows to append
`.windows.<n>`, and in microsoft/git to append `.vfs.0.0`. Let's keep
doing that.

Signed-off-by: Johannes Schindelin <[email protected]>
Since we really want to be based on a `.vfs.*` tag, let's make sure that
there was a new-enough one, i.e. one that agrees with the first three
version numbers of the recorded default version.

This prevents e.g. v2.22.0.vfs.0.<some-huge-number>.<commit> from being
used when the current release train was not yet tagged.

It is important to get the first three numbers of the version right
because e.g. Scalar makes decisions depending on those (such as assuming
that the `git maintenance` built-in is not available, even though it
actually _is_ available).

Signed-off-by: Johannes Schindelin <[email protected]>
This header file will accumulate GVFS-specific definitions.

Signed-off-by: Kevin Willford <[email protected]>
dscho and others added 2 commits November 6, 2025 09:32
The microsoft/git fork includes pre- and post-command hooks, with the
initial intention of using these for VFS for Git. In that environment,
these are important hooks to avoid concurrent issues when the
virtualization is incomplete.

However, in the Office monorepo the post-command hook is used in a
different way. A custom hook is used to update the sparse-checkout, if
necessary. To avoid this hook from being incredibly slow on every Git
command, this hook checks for the existence of a "sentinel file" that is
written by a custom post-index-change hook and no-ops if that file does
not exist.

However, even this "no-op" is 200ms due to the use of two scripts (one
simple script in .git/hooks/ does some environment checking and then
calls a script from the working directory which actually contains the
logic).

Add a new config option, 'postCommand.strategy', that will allow for
multiple possible strategies in the future. For now, the one we are
adding is 'post-index-change' which states that we should write a
sentinel file instead of running the 'post-index-change' hook and then
skip the 'post-command' hook if the proper sentinel file doesn't exist.
(If it does exist, then delete it and run the hook.)

--- 

This fork contains changes specific to monorepo scenarios. If you are an
external contributor, then please detail your reason for submitting to
this fork:

* [ ] This is an early version of work already under review upstream.
* [ ] This change only applies to interactions with Azure DevOps and the
      GVFS Protocol.
* [ ] This change only applies to the virtualization hook and VFS for
Git.
* [x] This change only applies to custom bits in the microsoft/git fork.
This patch series has been long in the making, ever since Johannes
Nicolai and myself spiked this in November/December 2020.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho force-pushed the tentative/vfs-2.52.0-rc0 branch from e463078 to cf48239 Compare November 6, 2025 08:35
@dscho
Copy link
Member Author

dscho commented Nov 6, 2025

Range-diff relative to vfs-2.51.2
  • 2: 9af360d = 1: a13b3b6 sparse-index.c: fix use of index hashes in expand_index

  • 3: 4b471d0 = 2: b924ab9 t5300: confirm failure of git index-pack when non-idx suffix requested

  • 5: fade4ed = 3: ce22fc8 t: remove advice from some tests

  • 6: 4b212ce = 4: 5e87d2d t1092: add test for untracked files and directories

  • 1: 613dc55 = 5: bc8fe5d survey: calculate more stats on refs

  • 7: 8dee356 = 6: 29cdb90 index-pack: disable rev-index if index file has non .idx suffix

  • 8: 19e8a70 = 7: 06a9722 trace2: prefetch value of GIT_TRACE2_DST_DEBUG at startup

  • 4: 706b915 = 8: cc9d08f survey: show some commits/trees/blobs histograms

  • 9: b125ef9 = 9: e7f1e6a survey: add vector of largest objects for various scaling dimensions

  • 10: 27b651d = 10: 4db694f survey: add pathname of blob or tree to large_item_vec

  • 11: 28b15ce = 11: 5430993 survey: add commit-oid to large_item detail

  • 12: 484369b = 12: 2ff6aa1 survey: add commit name-rev lookup to each large_item

  • 203: 58a4dc2 = 13: 78b124a cat_one_file(): make it easy to see that the size variable is initialized

  • 207: a705f7d = 14: 652aa89 fsck: avoid using an uninitialized variable

  • 205: d6c1426 = 15: f636816 revision: defensive programming

  • 206: da819f9 = 16: e0315ad get_parent(): defensive programming

  • 208: 5cee0f4 = 17: 4a7f67b fetch-pack: defensive programming

  • 210: 341b8f2 = 18: fd9d010 unparse_commit(): defensive programming

  • 212: cc453f8 ! 19: 0691fe8 verify_commit_graph(): defensive programming

    @@ Commit message
         Signed-off-by: Johannes Schindelin <[email protected]>
     
      ## commit-graph.c ##
    -@@ commit-graph.c: static int verify_one_commit_graph(struct repository *r,
    - 			the_repository->hash_algo);
    +@@ commit-graph.c: static int verify_one_commit_graph(struct commit_graph *g,
    + 			g->hash_algo);
      
      		graph_commit = lookup_commit(r, &cur_oid);
     +		if (!graph_commit) {
  • 213: b29a99e = 20: 7835772 stash: defensive programming

  • 214: 0ca5dab = 21: bb5031b stash: defensive programming

  • 215: 69a1205 = 22: 180bf17 push: defensive programming

  • 209: 46f0d90 = 23: 62a1904 load_revindex_from_disk(): avoid accessing uninitialized data

  • 216: d3a2987 = 24: 02f3d94 fetch: defensive programming

  • 211: 8c5e94f = 25: beacd12 load_pack_mtimes_file(): avoid accessing uninitialized data

  • 217: 2996ff9 = 26: 4fe23c9 fetch: silence a CodeQL alert about a local variable's address' use after release

  • 219: d2bf023 = 27: fbdf66e submodule: check return value of submodule_from_path()

  • 224: ee2812a = 28: 8b53b0c test-tool repository: check return value of lookup_commit()

  • 226: 8533dae = 29: c402925 shallow: handle missing shallow commits gracefully

  • 220: c4d4b13 = 30: 65281cb inherit_tracking(): defensive programming

  • 228: b883c8b ! 31: 25fdfc6 commit-graph: suppress warning about using a stale stack addresses

    @@ Commit message
     
      ## commit-graph.c ##
     @@ commit-graph.c: int write_commit_graph(struct odb_source *source,
    - 		struct commit_graph *g = ctx.r->objects->commit_graph;
      
    - 		while (g) {
    -+			/* Intentional: codeql[cpp/stack-address-escape] */
    - 			g->topo_levels = &topo_levels;
    - 			g = g->base_graph;
    - 		}
    + 	g = prepare_commit_graph(ctx.r);
    + 	for (struct commit_graph *chain = g; chain; chain = chain->base_graph)
    ++		/* Intentional: codeql[cpp/stack-address-escape] */
    + 		g->topo_levels = &topo_levels;
    + 
    + 	if (flags & COMMIT_GRAPH_WRITE_BLOOM_FILTERS)
  • 221: fcaeba7 ! 32: b361e0f codeql: run static analysis as part of CI builds

    @@ .gitignore: Release/
     +/.github/codeql/codeql-pack.lock.yml
     
      ## ci/install-dependencies.sh ##
    -@@ ci/install-dependencies.sh: ClangFormat)
    - 	sudo apt-get -q update
    +@@ ci/install-dependencies.sh: case "$jobname" in
    + ClangFormat)
      	sudo apt-get -q -y install clang-format
      	;;
     -StaticAnalysis)
     +StaticAnalysis|codeql)
    - 	sudo apt-get -q update
      	sudo apt-get -q -y install coccinelle libcurl4-openssl-dev libssl-dev \
      		libexpat-dev gettext make
    + 	;;
  • 222: 30cb8a2 = 33: b37754e codeql: publish the sarif file as build artifact

  • 223: db02191 = 34: 3a342c0 codeql: disable a couple of non-critical queries for now

  • 225: 8a9e4e0 = 35: ababb4a date: help CodeQL understand that there are no leap-year issues here

  • 227: b5d5c17 = 36: 59a23a2 help: help CodeQL understand that consuming envvars is okay here

  • 229: 9736752 = 37: b1d23ad ctype: help CodeQL understand that sane_istest() does not access array past end

  • 230: 8ad449b = 38: d62134b ctype: accommodate for CodeQL misinterpreting the z in mallocz()

  • 231: f171166 = 39: 0b03b30 strbuf_read: help with CodeQL misunderstanding that strbuf_read() does NUL-terminate correctly

  • 232: 205c573 = 40: 38820bf codeql: also check JavaScript code

  • 13: 5e04eca ! 41: 0e5310e survey: add --no-name-rev option

    @@ Documentation/git-survey.adoc: OPTIONS
      --progress::
      	Show progress.  This is automatically enabled when interactive.
      
    -+--[no-]name-rev::
    ++--name-rev::
    ++--no-name-rev::
     +	Print `git name-rev` output for each commit, tree, and blob.
     +	Defaults to true.
     +
  • 14: 49bc502 = 42: b38a286 survey: started TODO list at bottom of source file

  • 15: af5e4c9 = 43: 8bc6410 survey: expanded TODO list at the bottom of the source file

  • 16: 0e2f4b8 = 44: 3ac4451 survey: expanded TODO with more notes

  • 17: 9288341 = 45: 45ebce6 reset --stdin: trim carriage return from the paths

  • 18: ae13ea5 ! 46: c0f7611 Identify microsoft/git via a distinct version suffix

    @@ Commit message
      ## GIT-VERSION-GEN ##
     @@
      
    - DEF_VER=v2.51.2
    + DEF_VER=v2.52.0-rc0
      
     +# Identify microsoft/git via a distinct version suffix
     +DEF_VER=$DEF_VER.vfs.0.0
  • 19: 04e051a = 47: a94c4d4 gvfs: ensure that the version is based on a GVFS tag

  • 20: 3b80de8 = 48: c88546c gvfs: add a GVFS-specific header file

  • 21: 9c5f740 ! 49: a233cc2 gvfs: add the core.gvfs config setting

    @@ Makefile: LIB_OBJS += git-zlib.o
     
      ## config.c ##
     @@
    - #include "git-compat-util.h"
      #include "abspath.h"
    + #include "advice.h"
      #include "date.h"
     +#include "gvfs.h"
      #include "branch.h"
      #include "config.h"
    - #include "parse.h"
    + #include "dir.h"
     
      ## gvfs.c (new) ##
     @@
  • 22: f9eea6a = 50: 96c16e4 gvfs: add the feature to skip writing the index' SHA-1

  • 23: 5b59aad = 51: 821ea8e gvfs: add the feature that blobs may be missing

  • 24: 48d3376 = 52: 68d9b9f gvfs: prevent files to be deleted outside the sparse checkout

  • 25: 5f31231 = 53: 9bd1d2e gvfs: optionally skip reachability checks/upload pack during fetch

  • 26: 5043864 = 54: e0b0666 gvfs: ensure all filters and EOL conversions are blocked

  • 27: 9c932db ! 55: 6d06207 gvfs: allow "virtualizing" objects

    @@ connected.c: int check_connected(oid_iterate_fn fn, void *cb_data,
      		opt = &defaults;
     
      ## environment.c ##
    -@@ environment.c: int sparse_expect_files_outside_of_patterns;
    - int merge_log_config = -1;
    +@@ environment.c: int core_sparse_checkout_cone;
    + int sparse_expect_files_outside_of_patterns;
      int precomposed_unicode = -1; /* see probe_utf8_pathname_composition() */
      unsigned long pack_size_limit_cfg;
     +int core_virtualize_objects;
    @@ environment.c: int sparse_expect_files_outside_of_patterns;
      	/*
     
      ## environment.h ##
    -@@ environment.h: extern const char *comment_line_str;
    - extern char *comment_line_str_to_free;
    - extern int auto_comment_line_char;
    +@@ environment.h: extern int auto_comment_line_char;
    + extern bool warn_on_auto_comment_char;
    + #endif /* !WITH_BREAKING_CHANGES */
      
     +extern int core_virtualize_objects;
      # endif /* USE_THE_REPOSITORY_VARIABLE */
    @@ odb.c: static int do_oid_object_info_extended(struct object_database *odb,
      	if (co) {
      		if (oi->typep)
     @@ odb.c: static int do_oid_object_info_extended(struct object_database *odb,
    - 			reprepare_packed_git(odb->repo);
    + 			odb_reprepare(odb->repo->objects);
      			if (find_pack_entry(odb->repo, real, &e))
      				break;
     +			if (gvfs_virtualize_objects(odb->repo) && !tried_hook) {
  • 28: 0c1a8ac = 56: 9e9710e Hydrate missing loose objects in check_and_freshen()

  • 29: 9780730 = 57: 2381f6a sha1_file: when writing objects, skip the read_object_hook

  • 146: b165ade = 58: 38b92fd git_config_set_multivar_in_file_gently(): add a lock timeout

  • 147: aca1d33 = 59: 5b68974 scalar: set the config write-lock timeout to 150ms

  • 148: 2d21c9a = 60: 05640c1 scalar: add docs from microsoft/scalar

  • 149: 11061c1 = 61: c85e0cb scalar (Windows): use forward slashes as directory separators

  • 150: da7a432 = 62: b90e1b2 scalar: add retry logic to run_git()

  • 151: a2c7681 = 63: a1cef3a scalar: support the config command for backwards compatibility

  • 178: 340570a = 64: 8b35499 TO-UPSTREAM: sequencer: avoid progress when stderr is redirected

  • 30: 9befb64 ! 65: ea13c03 gvfs: add global command pre and post hook procs

    @@ Commit message
         2021-10-30: Recent movement of find_hook() to hook.c required moving these
         changes out of run-command.c to hook.c.
     
    +    2025-11-06: The `warn_on_auto_comment_char` hack is so ugly that it
    +    forces us to pile similarly ugly code on top because that hack _expects_
    +    that the config has not been read when `cmd_commit()`, `cmd_revert()`,
    +    `cmd_cherry_pick()`, `cmd_merge()`, or `cmd_rebase()` set that flag. But
    +    with the `pre_command()` hook already run, that assumption is incorrect.
    +
         Signed-off-by: Ben Peart <[email protected]>
         Signed-off-by: Johannes Schindelin <[email protected]>
     
    + ## builtin/commit.c ##
    +@@ builtin/commit.c: int cmd_commit(int argc,
    + 
    + #ifndef WITH_BREAKING_CHANGES
    + 	warn_on_auto_comment_char = true;
    ++	repo_config_clear(the_repository);
    + #endif /* !WITH_BREAKING_CHANGES */
    + 	prepare_repo_settings(the_repository);
    + 	the_repository->settings.command_requires_full_index = 0;
    +
    + ## builtin/merge.c ##
    +@@ builtin/merge.c: int cmd_merge(int argc,
    + 
    + #ifndef WITH_BREAKING_CHANGES
    + 	warn_on_auto_comment_char = true;
    ++	repo_config_clear(the_repository);
    + #endif /* !WITH_BREAKING_CHANGES */
    + 	prepare_repo_settings(the_repository);
    + 	the_repository->settings.command_requires_full_index = 0;
    +
    + ## builtin/rebase.c ##
    +@@ builtin/rebase.c: int cmd_rebase(int argc,
    + 
    + #ifndef WITH_BREAKING_CHANGES
    + 	warn_on_auto_comment_char = true;
    ++	repo_config_clear(the_repository);
    + #endif /* !WITH_BREAKING_CHANGES */
    + 	prepare_repo_settings(the_repository);
    + 	the_repository->settings.command_requires_full_index = 0;
    +
    + ## builtin/revert.c ##
    +@@
    + #include "rerere.h"
    + #include "sequencer.h"
    + #include "branch.h"
    ++#include "config.h"
    + 
    + /*
    +  * This implements the builtins revert and cherry-pick.
    +@@ builtin/revert.c: int cmd_revert(int argc,
    + 
    + #ifndef WITH_BREAKING_CHANGES
    + 	warn_on_auto_comment_char = true;
    ++	repo_config_clear(the_repository);
    + #endif /* !WITH_BREAKING_CHANGES */
    + 	opts.action = REPLAY_REVERT;
    + 	sequencer_init_config(&opts);
    +@@ builtin/revert.c: struct repository *repo UNUSED)
    + 
    + #ifndef WITH_BREAKING_CHANGES
    + 	warn_on_auto_comment_char = true;
    ++	repo_config_clear(the_repository);
    + #endif /* !WITH_BREAKING_CHANGES */
    + 	opts.action = REPLAY_PICK;
    + 	sequencer_init_config(&opts);
    +
      ## git.c ##
     @@
      #include "shallow.h"
  • 31: 7dc4725 = 66: d35ee8d t0400: verify that the hook is called correctly from a subdirectory

  • 32: ebccdf0 = 67: 8a72bf7 t0400: verify core.hooksPath is respected by pre-command

  • 33: 43d458c = 68: 91f0c82 Pass PID of git process to hooks.

  • 34: 0f2f180 = 69: b7a7125 sparse-checkout: make sure to update files with a modify/delete conflict

  • 35: 6ded9ec = 70: a2c1d35 worktree: allow in Scalar repositories

  • 36: 7473ad3 = 71: d206292 sparse-checkout: avoid writing entries with the skip-worktree bit

  • 37: 2203791 = 72: e54a143 Do not remove files outside the sparse-checkout

  • 38: 215708f = 73: bdd0477 send-pack: do not check for sha1 file when GVFS_MISSING_OK set

  • 39: 3146ead = 74: d04b499 gvfs: allow corrupt objects to be re-downloaded

  • 40: 92f52b0 = 75: 610bacb cache-tree: remove use of strbuf_addf in update_one

  • 41: 6c57fb7 ! 76: b88a9ce gvfs: block unsupported commands when running in a GVFS repo

    @@ builtin/gc.c: static int gc_foreground_tasks(struct maintenance_run_opts *opts,
      	int force = 0;
     @@ builtin/gc.c: int cmd_gc(int argc,
      	if (opts.quiet)
    - 		strvec_push(&repack, "-q");
    + 		strvec_push(&repack_args, "-q");
      
     +	if ((!opts.auto_flag || (opts.auto_flag && cfg.gc_auto_threshold > 0)) &&
     +	    gvfs_config_is_set(repo, GVFS_BLOCK_COMMANDS))
    @@ builtin/update-index.c
      
      #include "builtin.h"
     +#include "gvfs.h"
    - #include "bulk-checkin.h"
      #include "config.h"
      #include "environment.h"
    + #include "gettext.h"
     @@ builtin/update-index.c: static enum parse_opt_result reupdate_callback(
      int cmd_update_index(int argc,
      		     const char **argv,
    @@ builtin/update-index.c: int cmd_update_index(int argc,
      			printf(_("%d\n"), the_repository->index->version);
      		} else if (preferred_index_format < INDEX_FORMAT_LB ||
     @@ builtin/update-index.c: int cmd_update_index(int argc,
    - 	end_odb_transaction();
    + 	odb_transaction_commit(transaction);
      
      	if (split_index > 0) {
     +		if (gvfs_config_is_set(repo, GVFS_BLOCK_COMMANDS))
    @@ git.c: static struct cmd_struct commands[] = {
     +	{ "repack", cmd_repack, RUN_SETUP | BLOCK_ON_GVFS_REPO },
      	{ "replace", cmd_replace, RUN_SETUP },
      	{ "replay", cmd_replay, RUN_SETUP },
    - 	{ "rerere", cmd_rerere, RUN_SETUP },
    + 	{ "repo", cmd_repo, RUN_SETUP },
     @@ git.c: static struct cmd_struct commands[] = {
      	{ "stash", cmd_stash, RUN_SETUP | NEED_WORK_TREE },
      	{ "status", cmd_status, RUN_SETUP | NEED_WORK_TREE },
  • 42: 1f50360 = 77: 7c28999 gvfs: allow overriding core.gvfs

  • 43: 2c25e77 = 78: b43844d BRANCHES.md: Add explanation of branches and using forks

  • 50: bc8c920 ! 79: 35c23ee Add virtual file system settings and hook proc

    @@ Documentation/githooks.adoc: and "0" meaning they were not.
      linkgit:git-hook[1]
     
      ## Makefile ##
    -@@ Makefile: LIB_OBJS += utf8.o
    - LIB_OBJS += varint.o
    +@@ Makefile: LIB_OBJS += varint.o
    + endif
      LIB_OBJS += version.o
      LIB_OBJS += versioncmp.o
     +LIB_OBJS += virtualfilesystem.o
    @@ environment.c: int grafts_keep_true_parents;
      int core_sparse_checkout_cone;
      int sparse_expect_files_outside_of_patterns;
     +char *core_virtualfilesystem;
    - int merge_log_config = -1;
      int precomposed_unicode = -1; /* see probe_utf8_pathname_composition() */
      unsigned long pack_size_limit_cfg;
    + int core_virtualize_objects;
     @@ environment.c: int git_default_core_config(const char *var, const char *value,
      	}
      
    @@ environment.h: extern int pack_compression_level;
     
      ## meson.build ##
     @@ meson.build: libgit_sources = [
    -   'varint.c',
    +   'utf8.c',
        'version.c',
        'versioncmp.c',
     +  'virtualfilesystem.c',
    @@ meson.build: libgit_sources = [
     
      ## read-cache.c ##
     @@
    + #define DISABLE_SIGN_COMPARE_WARNINGS
      
      #include "git-compat-util.h"
    - #include "bulk-checkin.h"
     +#include "virtualfilesystem.h"
      #include "config.h"
      #include "date.h"
  • 44: 14a92fa = 80: 4320650 git.c: add VFS enabled cmd blocking

  • 51: 6aa5d01 = 81: b4e1cd0 virtualfilesystem: don't run the virtual file system hook if the index has been redirected

  • 45: a34b3f1 ! 82: c335e49 git.c: permit repack cmd in Scalar repos

    @@ git.c: static struct cmd_struct commands[] = {
     +	{ "repack", cmd_repack, RUN_SETUP | BLOCK_ON_VFS_ENABLED },
      	{ "replace", cmd_replace, RUN_SETUP },
      	{ "replay", cmd_replay, RUN_SETUP },
    - 	{ "rerere", cmd_rerere, RUN_SETUP },
    + 	{ "repo", cmd_repo, RUN_SETUP },
     
      ## t/t0402-block-command-on-gvfs.sh ##
     @@ t/t0402-block-command-on-gvfs.sh: not_with_gvfs fsck
  • 52: 22e4912 = 83: 8b4db2c virtualfilesystem: check if directory is included

  • 46: 65ff52a = 84: fc23cca git.c: permit fsck cmd in Scalar repos

  • 53: 38772b3 = 85: 879187e backwards-compatibility: support the post-indexchanged hook

  • 47: 25ce0e4 = 86: 0f1c8fa git.c: permit prune cmd in Scalar repos

  • 54: d33bb15 = 87: 77cf91b gvfs: verify that the built-in FSMonitor is disabled

  • 48: 12c1a9b = 88: 414949f worktree: remove special case GVFS cmd blocking

  • 55: 3516924 = 89: b2d8392 wt-status: add trace2 data for sparse-checkout percentage

  • 49: f6d522e ! 90: 22e962e builtin/repack.c: emit warning when shared cache is present

    @@ Commit message
     
      ## builtin/repack.c ##
     @@
    - #include "pack-bitmap.h"
    - #include "refs.h"
    - #include "list-objects-filter-options.h"
    + #include "promisor-remote.h"
    + #include "repack.h"
    + #include "shallow.h"
     +#include "gvfs.h"
      
      #define ALL_INTO_ONE 1
      #define LOOSEN_UNREACHABLE 2
    -@@ builtin/repack.c: static const char *find_pack_prefix(const char *packdir, const char *packtmp)
    - int cmd_repack(int argc,
    - 	       const char **argv,
    - 	       const char *prefix,
    --	       struct repository *repo UNUSED)
    -+	       struct repository *repo)
    - {
    - 	struct child_process cmd = CHILD_PROCESS_INIT;
    - 	struct string_list_item *item;
     @@ builtin/repack.c: int cmd_repack(int argc,
    + 	struct tempfile *refs_snapshot = NULL;
    + 	int i, ret;
      	int show_progress;
    - 	char **midx_pack_names = NULL;
    - 	size_t midx_pack_names_nr = 0;
     +	const char *tmp_obj_dir = NULL;
      
      	/* variables to be filled by option parsing */
    - 	int delete_redundant = 0;
    + 	struct repack_config_ctx config_ctx;
     @@ builtin/repack.c: int cmd_repack(int argc,
      		write_bitmaps = 0;
      	}
  • 56: da83c75 ! 91: d9fcb0b status: add status serialization mechanism

    @@ Makefile: LIB_OBJS += wrapper.o
     +LIB_OBJS += wt-status-deserialize.o
     +LIB_OBJS += wt-status-serialize.o
      LIB_OBJS += xdiff-interface.o
    - 
    - BUILTIN_OBJS += builtin/add.o
    + LIB_OBJS += xdiff/xdiffi.o
    + LIB_OBJS += xdiff/xemit.o
     
      ## builtin/commit.c ##
     @@ builtin/commit.c: static int opt_parse_porcelain(const struct option *opt, const char *arg, int un
  • 57: e1c8388 = 92: 06cba35 Teach ahead-behind and serialized status to play nicely together

  • 58: 14241f2 = 93: 83841fa status: serialize to path

  • 59: 0b8acde = 94: ea4b7cc status: reject deserialize in V2 and conflicts

  • 60: f52611d = 95: 9c63e85 serialize-status: serialize global and repo-local exclude file metadata

  • 61: 0d8a629 = 96: cd3b841 status: deserialization wait

  • 62: c366d5e = 97: afef9e9 status: deserialize with -uno does not print correct hint

  • 63: fe1ae60 = 98: f4f16b9 fsmonitor: check CE_FSMONITOR_VALID in ce_uptodate

  • 64: 8510d49 = 99: 766798b fsmonitor: add script for debugging and update script for tests

  • 65: 260b8b0 = 100: 21b4089 status: disable deserialize when verbose output requested.

  • 66: e4dec19 = 101: 77f39b5 t7524: add test for verbose status deserialzation

  • 67: c964f1d = 102: 8142cd7 deserialize-status: silently fallback if we cannot read cache file

  • 68: b4bedf4 = 103: 10b3cec gvfs:trace2:data: add trace2 tracing around read_object_process

  • 69: 84669cd = 104: 69e430d gvfs:trace2:data: status deserialization information

  • 70: c61d00d = 105: 3148bd6 gvfs:trace2:data: status serialization

  • 71: 33cafaa = 106: b3c42cc gvfs:trace2:data: add vfs stats

  • 72: 677dfd2 = 107: 47d83b9 trace2: refactor setting process starting time

  • 73: 17154f3 = 108: 8553e35 trace2:gvfs:experiment: clear_ce_flags_1

  • 74: e2c2073 = 109: cc29e0e trace2:gvfs:experiment: report_tracking

  • 75: 374f305 = 110: ebd8cee trace2:gvfs:experiment: read_cache: annotate thread usage in read-cache

  • 76: 19383da = 111: fb0c8e1 trace2:gvfs:experiment: read-cache: time read/write of cache-tree extension

  • 77: ffbec3b = 112: f8d7367 trace2:gvfs:experiment: add region to apply_virtualfilesystem()

  • 78: 381465f = 113: 648e50f trace2:gvfs:experiment: add region around unpack_trees()

  • 79: 8526c78 = 114: 8d59be5 trace2:gvfs:experiment: add region to cache_tree_fully_valid()

  • 80: 328ac86 = 115: d43bd29 trace2:gvfs:experiment: add unpack_entry() counter to unpack_trees() and report_tracking()

  • 81: ce655c3 = 116: 130827e trace2:gvfs:experiment: increase default event depth for unpack-tree data

  • 82: 33cc355 = 117: 287fcdf trace2:gvfs:experiment: add data for check_updates() in unpack_trees()

  • 83: 57837d1 = 118: db5daa8 Trace2:gvfs:experiment: capture more 'tracking' details

  • 84: d087b8d = 119: a33a33b credential: set trace2_child_class for credential manager children

  • 85: f368e91 = 120: eee1de9 sub-process: do not borrow cmd pointer from caller

  • 86: 3340ce0 = 121: 2722193 sub-process: add subprocess_start_argv()

  • 87: 90ba532 = 122: c62971c sha1-file: add function to update existing loose object cache

  • 88: b0a3c67 ! 123: 6e7e322 packfile: add install_packed_git_and_mru()

    @@ Commit message
         Signed-off-by: Jeff Hostetler <[email protected]>
     
      ## packfile.c ##
    -@@ packfile.c: void install_packed_git(struct repository *r, struct packed_git *pack)
    - 	hashmap_add(&r->objects->pack_map, &pack->packmap_ent);
    +@@ packfile.c: void packfile_store_add_pack(struct packfile_store *store,
    + 	hashmap_add(&store->map, &pack->packmap_ent);
      }
      
    -+void install_packed_git_and_mru(struct repository *r, struct packed_git *pack)
    ++void packfile_store_add_pack_also_to_mru(struct repository *r,
    ++					 struct packed_git *pack)
     +{
    -+	install_packed_git(r, pack);
    -+	list_add(&pack->mru, &r->objects->packed_git_mru);
    ++	packfile_store_add_pack(r->objects->packfiles, pack);
    ++	list_add(&pack->mru,
    ++		 packfile_store_get_packs_mru(r->objects->packfiles));
     +}
     +
    - void (*report_garbage)(unsigned seen_bits, const char *path);
    - 
    - static void report_helper(const struct string_list *list,
    + struct packed_git *packfile_store_load_pack(struct packfile_store *store,
    + 					    const char *idx_path, int local)
    + {
     
      ## packfile.h ##
    -@@ packfile.h: extern void (*report_garbage)(unsigned seen_bits, const char *path);
    - 
    - void reprepare_packed_git(struct repository *r);
    - void install_packed_git(struct repository *r, struct packed_git *pack);
    -+void install_packed_git_and_mru(struct repository *r, struct packed_git *pack);
    +@@ packfile.h: void packfile_store_reprepare(struct packfile_store *store);
    +  */
    + void packfile_store_add_pack(struct packfile_store *store,
    + 			     struct packed_git *pack);
    ++/*
    ++ * Add the pack to the store so that contained objects become accessible via
    ++ * the store, and then mark it as most recently used. This moves ownership into
    ++ * the store.
    ++ */
    ++void packfile_store_add_pack_also_to_mru(struct repository *r,
    ++					 struct packed_git *pack);
      
    - struct packed_git *get_packed_git(struct repository *r);
    - struct list_head *get_packed_git_mru(struct repository *r);
    + /*
    +  * Load and iterate through all packs of the given repository. This helper
  • 89: 95f8a98 = 124: ffc80f3 index-pack: avoid immediate object fetch while parsing packfile

  • 90: 22fb7b0 ! 125: 81938b8 gvfs-helper: create tool to fetch objects using the GVFS Protocol

    @@ gvfs-helper-client.c (new)
     +
     +	p = add_packed_git(the_repository, path.buf, path.len, is_local);
     +	if (p)
    -+		install_packed_git_and_mru(the_repository, p);
    ++		packfile_store_add_pack_also_to_mru(the_repository, p);
     +	strbuf_release(&path);
     +}
     +
    @@ odb.c: static int do_oid_object_info_extended(struct object_database *odb,
     +
      		/* Not a loose object; someone else may have just packed it. */
      		if (!(flags & OBJECT_INFO_QUICK)) {
    - 			reprepare_packed_git(odb->repo);
    + 			odb_reprepare(odb->repo->objects);
      			if (find_pack_entry(odb->repo, real, &e))
      				break;
      			if (gvfs_virtualize_objects(odb->repo) && !tried_hook) {
    @@ t/helper/.gitignore
     +/test-gvfs-protocol
      /test-tool
      /test-fake-ssh
    +
    + ## t/t1517-outside-repo.sh ##
    +@@ t/t1517-outside-repo.sh: do
    + 	credential-osxkeychain | cvsexportcommit | cvsimport | cvsserver | \
    + 	daemon | \
    + 	difftool--helper | filter-branch | fsck-objects | get-tar-commit-id | \
    +-	gui | gui--askpass | \
    ++	gui | gui--askpass | gvfs-helper | \
    + 	http-backend | http-fetch | http-push | init-db | \
    + 	merge-octopus | merge-one-file | merge-resolve | mergetool | \
    + 	mktag | p4 | p4.py | pickaxe | remote-ftp | remote-ftps | \
  • 91: 5e1149f = 126: 79e494a sha1-file: create shared-cache directory if it doesn't exist

  • 92: 6847778 = 127: 0749aef gvfs-helper: better handling of network errors

  • 93: 7bd5218 = 128: 7c82eb3 gvfs-helper-client: properly update loose cache with fetched OID

  • 94: 723e522 = 129: 2adbc16 gvfs-helper: V2 robust retry and throttling

  • 95: c25e5be = 130: 2277caf gvfs-helper: expose gvfs/objects GET and POST semantics

  • 96: 9789c54 = 131: f52091e gvfs-helper: dramatically reduce progress noise

  • 97: 402e36a = 132: 0243158 gvfs-helper: handle pack-file after single POST request

  • 98: c0d7574 ! 133: dbe1bae test-gvfs-prococol, t5799: tests for gvfs-helper

    @@ t/helper/test-gvfs-protocol.c (new)
     +
     +	nr_start_line_fields = string_list_split(&req->start_line_fields,
     +						 req->start_line.buf,
    -+						 ' ', -1);
    ++						 " ", -1);
     +	if (nr_start_line_fields != 3) {
     +		logerror("could not parse request start-line '%s'",
     +			 req->start_line.buf);
  • 99: 68bb1d0 = 134: 040e897 gvfs-helper: move result-list construction into install functions

  • 100: 44144e6 = 135: db64064 t5799: add support for POST to return either a loose object or packfile

  • 101: 97cd392 = 136: 833e2e6 t5799: cleanup wc-l and grep-c lines

  • 102: 0836e09 = 137: 4a8645f gvfs-helper: verify loose objects after write

  • 103: 598be7c = 138: 116cea5 t7599: create corrupt blob test

  • 104: 0ec6290 = 139: d53d9e3 gvfs-helper: add prefetch support

  • 105: b1511e7 = 140: 8e8fdbb gvfs-helper: add prefetch .keep file for last packfile

  • 106: 8e41e13 = 141: 5283a47 gvfs-helper: do one read in my_copy_fd_len_tail()

  • 107: 1c34b67 = 142: 9f08dab gvfs-helper: move content-type warning for prefetch packs

  • 108: def51d9 = 143: c1e461c fetch: use gvfs-helper prefetch under config

  • 109: c49ca1b = 144: 9a1b943 gvfs-helper: better support for concurrent packfile fetches

  • 110: 51d1406 = 145: 6962871 remote-curl: do not call fetch-pack when using gvfs-helper

  • 111: 2a8d156 ! 146: 0d25abb fetch: reprepare packs before checking connectivity

    @@ builtin/fetch.c: static int store_updated_refs(struct display_state *display_sta
     +		 * Before checking connectivity, be really sure we have the
     +		 * latest pack-files loaded into memory.
     +		 */
    -+		reprepare_packed_git(the_repository);
    ++		odb_reprepare(the_repository->objects);
     +
      		if (check_connected(iterate_ref_map, &rm, &opt)) {
      			rc = error(_("%s did not send all necessary objects"),
  • 112: 3e8a60d = 147: e6f75ad gvfs-helper: retry when creating temp files

  • 113: 3967098 = 148: e954bda sparse: avoid warnings about known cURL issues in gvfs-helper.c

  • 120: 3dc543b = 149: 3e7f3fd maintenance: care about gvfs.sharedCache config

  • 121: 650132a = 150: cb3a5c1 unpack-trees:virtualfilesystem: Improve efficiency of clear_ce_flags

  • 122: 77b743c = 151: 350572e homebrew: add GitHub workflow to release Cask

  • 124: 1482654 = 152: 46f15e2 Adding winget workflows

  • 125: 842ebbd = 153: 571b446 Disable the monitor-components workflow in msft-git

  • 114: e3aa0dd = 154: 7be2e5c gvfs-helper: add --max-retries to prefetch verb

  • 126: f2bd50c = 155: c6aa8f1 .github: enable windows builds on microsoft fork

  • 115: a69fbe7 = 156: 7664b9a t5799: add tests to detect corrupt pack/idx files in prefetch

  • 127: c210181 = 157: 81302ca .github/actions/akv-secret: add action to get secrets

  • 116: b458577 = 158: 201f1a5 gvfs-helper: ignore .idx files in prefetch multi-part responses

  • 128: 5ffae8c = 159: c4b4f7c release: create initial Windows installer build workflow

  • 117: c93f5e4 = 160: b8811a0 t5799: explicitly test gvfs-helper --fallback and --no-fallback

  • 129: 5bf7166 = 161: cf32e69 release: create initial Windows installer build workflow

  • 118: 0d240f1 = 162: eac613c gvfs-helper: don't fallback with new config

  • 130: 41a0286 = 163: 05a6f23 help: special-case HOST_CPU universal

  • 119: 20fd8aa = 164: 40f1b63 test-gvfs-protocol: add cache_http_503 to mayhem

  • 131: 0f21624 = 165: 89a7ed6 release: add Mac OSX installer build

  • 123: a5ad374 = 166: 731f476 t5799: add unit tests for new gvfs.fallback config setting

  • 132: 0c24464 = 167: abab2db release: build unsigned Ubuntu .deb package

  • 133: c376199 = 168: 55bd87c release: add signing step for .deb package

  • 139: 9adcb93 ! 169: 35d9c4d update-microsoft-git: create barebones builtin

    @@ meson.build: builtin_sources = [
        'builtin/update-ref.c',
        'builtin/update-server-info.c',
        'builtin/upload-archive.c',
    +
    + ## t/t1517-outside-repo.sh ##
    +@@ t/t1517-outside-repo.sh: do
    + 	mktag | p4 | p4.py | pickaxe | remote-ftp | remote-ftps | \
    + 	remote-http | remote-https | replay | send-email | \
    + 	sh-i18n--envsubst | shell | show | stage | submodule | survey | svn | \
    ++	update-microsoft-git | \
    + 	upload-archive--writer | upload-pack | web--browse | whatchanged)
    + 		expect_outcome=expect_failure ;;
    + 	*)
  • 134: e1a9171 = 170: b93b3de release: create draft GitHub release with packages & installers

  • 141: 6a5b75f = 171: b1fea8f update-microsoft-git: Windows implementation

  • 135: 28b94c1 = 172: 0d0387a build-git-installers: publish gpg public key

  • 142: fa26644 = 173: 45d9338 update-microsoft-git: use brew on macOS

  • 136: f8db349 = 174: 219b139 release: continue pestering until user upgrades

  • 143: 660db67 = 175: 75a6401 .github: reinstate ISSUE_TEMPLATE.md for microsoft/git

  • 137: 3ea57ae = 176: 9e28bca dist: archive HEAD instead of HEAD^{tree}

  • 144: 5466c79 = 177: 7e7a063 .github: update PULL_REQUEST_TEMPLATE.md

  • 138: 05b7e59 = 178: 7d99d88 release: include GIT_BUILT_FROM_COMMIT in MacOS build

  • 145: 944c77b = 179: 51ce5a3 Adjust README.md for microsoft/git

  • 140: 418795e = 180: 302d10b release: add installer validation

  • 152: 6b0db5b = 181: 413344d scalar: implement a minimal JSON parser

  • 153: 7b9dbba = 182: bbb2c93 scalar clone: support GVFS-enabled remote repositories

  • 154: 2884a66 = 183: eb850b1 test-gvfs-protocol: also serve smart protocol

  • 155: b477623 = 184: 4b98ad9 gvfs-helper: add the endpoint command

  • 156: 63719bd = 185: dccad8b dir_inside_of(): handle directory separators correctly

  • 157: f5e7f8c = 186: c618d9f scalar: disable authentication in unattended mode

  • 158: 4b71896 = 187: 665dcba abspath: make strip_last_path_component() global

  • 159: 5a21d17 = 188: c058b25 scalar: do initialize gvfs.sharedCache

  • 160: 0bf671f = 189: ce927e6 scalar diagnose: include shared cache info

  • 161: d4ea55f = 190: e111532 scalar: only try GVFS protocol on https:// URLs

  • 162: d478fd1 = 191: 9371c15 scalar: verify that we can use a GVFS-enabled repository

  • 163: c490b6d = 192: ffc1873 scalar: add the cache-server command

  • 164: 47fcc09 = 193: f886527 scalar: add a test toggle to skip accessing the vsts/info endpoint

  • 165: 1f26a1a = 194: 4cdb1f6 scalar: adjust documentation to the microsoft/git fork

  • 166: cf00b21 = 195: 7b665d8 scalar: enable untracked cache unconditionally

  • 167: 0ac8844 = 196: 3ffb7c1 scalar: parse clone --no-fetch-commits-and-trees for backwards compatibility

  • 168: a033fb3 ! 197: 55f9157 scalar: make GVFS Protocol a forced choice

    @@ Documentation/scalar.adoc: clone), and `~/.scalarCache` on macOS.
      	Retrieve missing objects from the specified remote, which is expected to
      	understand the GVFS protocol.
      
    -+--[no-]gvfs-protocol::
    ++--gvfs-protocol::
    ++--no-gvfs-protocol::
     +	When cloning from a `<url>` with either `dev.azure.com` or
     +	`visualstudio.com` in the name, `scalar clone` will attempt to use the GVFS
     +	Protocol to access Git objects, specifically from a cache server when
  • 169: 300f709 = 198: ef85362 scalar: work around GVFS Protocol HTTP/2 failures

  • 170: bd508d1 = 199: 05a005c gvfs-helper-client: clean up server process(es)

  • 171: f32f859 = 200: ae955d0 scalar diagnose: accommodate Scalar's Functional Tests

  • 172: fb9c305 = 201: 0037aab ci: run Scalar's Functional Tests

  • 173: 697a572 = 202: 87c0320 scalar: upgrade to newest FSMonitor config setting

  • 174: 7c9daa8 = 203: e8a204b add/rm: allow adding sparse entries when virtual

  • 175: 52ae66e = 204: 1a38d33 sparse-checkout: add config to disable deleting dirs

  • 176: 6f81c66 = 205: 3ca5d4c diff: ignore sparse paths in diffstat

  • 177: 67395bb = 206: 76f7429 repo-settings: enable sparse index by default

  • 179: 90a9fc5 = 207: 33c4ac5 TO-CHECK: t1092: use quiet mode for rebase tests

  • 180: 44d3621 = 208: c588a1e reset: fix mixed reset when using virtual filesystem

  • 181: e208699 = 209: f5b0000 diff(sparse-index): verify with partially-sparse

  • 182: 7c764a4 = 210: 45a4e8b stash: expand testing for git stash -u

  • 183: ea5e996 = 211: 320dae9 sparse-index: add ensure_full_index_with_reason()

  • 184: 0e43a58 ! 212: d082dd2 treewide: add reasons for expanding index

    @@ builtin/checkout-index.c: static int checkout_all(struct index_state *index, con
     
      ## builtin/ls-files.c ##
     @@ builtin/ls-files.c: static void show_files(struct repository *repo, struct dir_struct *dir)
    - 		return;
    - 
    - 	if (!show_sparse_dirs)
    --		ensure_full_index(repo->index);
    -+		ensure_full_index_with_reason(repo->index, "ls-files");
    + 			 * so expansion will leave the first 'i' entries
    + 			 * alone.
    + 			 */
    +-			ensure_full_index(repo->index);
    ++			ensure_full_index_with_reason(repo->index, "ls-files");
    + 			ce = repo->index->cache[i];
    + 		}
      
    - 	for (i = 0; i < repo->index->cache_nr; i++) {
    - 		const struct cache_entry *ce = repo->index->cache[i];
     
      ## builtin/read-tree.c ##
     @@ builtin/read-tree.c: int cmd_read_tree(int argc,
  • 185: acb842c = 213: 090b316 treewide: custom reasons for expanding index

  • 186: 36d82ad = 214: db3a005 sparse-index: add macro for unaudited expansions

  • 187: c8bd7fc = 215: 7d70202 Docs: update sparse index plan with logging

  • 188: 60ec5b0 = 216: f4215dc sparse-index: log failure to clear skip-worktree

  • 189: c1c48da = 217: bbb626d stash: use -f in checkout-index child process

  • 190: a5c0065 = 218: 2b210e8 sparse-index: do not copy hashtables during expansion

  • 191: fd487c4 = 219: e6e6df4 TO-UPSTREAM: sub-process: avoid leaking cmd

  • 192: 4596ced = 220: 8155039 remote-curl: release filter options before re-setting them

  • 193: ff39c74 = 221: b1d2722 transport: release object filter options

  • 194: 465ae5f = 222: 56e0d97 push: don't reuse deltas with path walk

  • 195: d929602 = 223: 623f76e t7900-maintenance.sh: reset config between tests

  • 196: 2ff614f ! 224: 9cf29e3 maintenance: add cache-local-objects maintenance task

    @@ builtin/gc.c: enum maintenance_task_label {
      
      	/* Leave as final value */
      	TASK__COUNT
    -@@ builtin/gc.c: static int maintenance_task_incremental_repack(struct maintenance_run_opts *opts
    - 	return 0;
    +@@ builtin/gc.c: static int geometric_repack_auto_condition(struct gc_config *cfg UNUSED)
    + 	return ret;
      }
      
     +static void link_or_copy_or_die(const char *src, const char *dst)
    @@ builtin/gc.c: static const struct maintenance_task tasks[] = {
      
      enum task_phase {
     @@ builtin/gc.c: static const struct maintenance_strategy incremental_strategy = {
    - 		[TASK_LOOSE_OBJECTS].schedule = SCHEDULE_DAILY,
    - 		[TASK_PACK_REFS].enabled = 1,
    - 		[TASK_PACK_REFS].schedule = SCHEDULE_WEEKLY,
    -+		[TASK_CACHE_LOCAL_OBJS].enabled = 1,
    -+		[TASK_CACHE_LOCAL_OBJS].schedule = SCHEDULE_WEEKLY,
    - 	},
    - };
    - 
    + 			.type = MAINTENANCE_TYPE_SCHEDULED,
    + 			.schedule = SCHEDULE_WEEKLY,
    + 		},
    ++		[TASK_CACHE_LOCAL_OBJS] = {
    ++			.type = MAINTENANCE_TYPE_SCHEDULED,
    ++			.schedule = SCHEDULE_WEEKLY,
    ++		},
    + 		/*
    + 		 * Historically, the "incremental" strategy was only available
    + 		 * in the context of scheduled maintenance when set up via
     
      ## t/t7900-maintenance.sh ##
     @@ t/t7900-maintenance.sh: test_systemd_analyze_verify () {
  • 197: 9df2478 = 225: 6dade3f scalar.c: add cache-local-objects task

  • 198: 0c39915 = 226: 3db85bc hooks: add custom post-command hook config

  • 199: ed72d57 = 227: 9b00a05 TO-UPSTREAM: Docs: fix asciidoc failures from short delimiters

  • 200: ec39e77 = 228: d56af6f hooks: make hook logic memory-leak free

  • 201: 5c37e2b (superseded by clar-test/clar@7eaea8b, merged via e7f04f6) < -: ----------- clar: pass a string for a %s format placeholder

  • 202: 4af4501 (clar-test/clar@0c5d4ec, merged via e7f04f6) < -: ----------- clar(clar__assert_equal): do in-bounds check before accessing element

  • 204: 531f358 (clar-test/clar@ca0b519, merged via e7f04f6) < -: ----------- clar(clar_summary_testsuite): avoid thread-unsafe localtime()

  • 218: 54a85b1 (made obsolete by 7c10e48) < -: ----------- describe: defensive programming

In the `linux-breaking-changes`, Git's test suite tries to verify that
the `commentChar=auto` config is no longer allowed.

However, it sets that config using `git config`, and since the config is
read when trying to run the `post-command` hook (because of
`core.hooksPath`...!), the check _already_ triggers, the `git config`
invocation reports a failure, and Git's test gets completely confused.

Let's help it not to be confused by simply skipping that test, it's not
like we'll fail to manage once Git v3.0 comes around.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
Copy link
Member Author

dscho commented Nov 6, 2025

I won't go into details of the easy-to-explain issues (such as context changes, or indentation changes, or relatively simple code moves). But there are a couple of major things going on in here:

Upstream merged the packfiles and mru lists of packfiles

  • 88: b0a3c67 ! 123: 6e7e322 packfile: add install_packed_git_and_mru()

This one is painful, and potentially has an impact on performance. Basically, upstream merged the two lists into a single one, the "Most Recently Used" one, in c31bad4. This has not yet hit master, but the preparations have, and they caused merge conflicts.

But here's the larger impact: The Scalar-specific (or more correctly: gvfs-helper-specific) support code in our fork introduced a new function to specifically add a pack also to the MRU list. This will most likely be unnecessary in the near future because there is no additional MRU list. That's good! What is a bit worrisome is that the merge changes performance characteristics, and the risk is that Scalar or VFSforGit might have usage patterns that may not benefit as much from the MRU list as they did from the local-packfiles-first list that has been replaced with the MRU list. I guess we'll need to ask everyone with a big repository to test this.

Unintended interactions between the pre-command/post-command feature and the way commentChar=auto is deprecated

  • 30: 9befb64 ! 65: ea13c03 gvfs: add global command pre and post hook procs

Upstream Git decided to deprecate core.commentChar=auto. The way they communicate that, though, is quite hacky, and expects that the config is going to be read afresh inside, say, cmd_commit() after setting a global flag. However, this assumption is incorrect when the pre-command hook logic already looked for core.hooksPath and hence already read the config.

See also e03f7d1

Stricter checks for commands showing their usage outside of worktrees

+@@ t/t1517-outside-repo.sh: do
+ 	credential-osxkeychain | cvsexportcommit | cvsimport | cvsserver | \
+ 	daemon | \
+ 	difftool--helper | filter-branch | fsck-objects | get-tar-commit-id | \
+-	gui | gui--askpass | \
++	gui | gui--askpass | gvfs-helper | \
+ 	http-backend | http-fetch | http-push | init-db | \
+ 	merge-octopus | merge-one-file | merge-resolve | mergetool | \
+ 	mktag | p4 | p4.py | pickaxe | remote-ftp | remote-ftps | \

This is needed (also for update-microsoft-git) to appease the t1517 test.

Git's documentation now has to spell out --no-* flags

@@ Documentation/git-survey.adoc: OPTIONS
  --progress::
  	Show progress.  This is automatically enabled when interactive.
  
-+--[no-]name-rev::
++--name-rev::
++--no-name-rev::
 +	Print `git name-rev` output for each commit, tree, and blob.
 +	Defaults to true.
 +

The --[no-]-* way to describe things is unintuitive.

reprepare_packed_git() was renamed to odb_reprepare()

- 			reprepare_packed_git(odb->repo);
+ 			odb_reprepare(odb->repo->objects);

Changed function signature of string_list_split()

@@ t/helper/test-gvfs-protocol.c (new)
 +
 +	nr_start_line_fields = string_list_split(&req->start_line_fields,
 +						 req->start_line.buf,
-+						 ' ', -1);
++						 " ", -1);
 +	if (nr_start_line_fields != 3) {
 +		logerror("could not parse request start-line '%s'",
 +			 req->start_line.buf);

I am uncertain what the benefit is of allowing more than one terminator, but apparently it was worth it to upstream Git to buy it with the slightly decreased performance.

@dscho dscho marked this pull request as ready for review November 6, 2025 10:17
@dscho dscho enabled auto-merge November 6, 2025 10:20
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 the careful overview of the issues in this rebase.

@dscho dscho merged commit dddad21 into vfs-2.52.0-rc0 Nov 6, 2025
129 checks passed
@dscho dscho deleted the tentative/vfs-2.52.0-rc0 branch November 6, 2025 14:36
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.