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

Update Git to v2.27.0 #271

Merged
merged 113 commits into from Jun 1, 2020
Merged

Update Git to v2.27.0 #271

merged 113 commits into from Jun 1, 2020

Conversation

derrickstolee
Copy link
Collaborator

@derrickstolee derrickstolee commented May 18, 2020

Here is the rebase on top of v2.27.0-rc0.windows.1.

I did quite a bit of squashing and rearranging commits to ensure that each one compiles and passes the test suite. (I probably won't repeat the test suite check again.)

I'll update the range-diff soon with annotations after I kick off the installer builds.

Range-diff:

  1:  151a6fd4a12 =   1:  230fe5598b9 reset --stdin: trim carriage return from the paths
  2:  1f5a65d4b98 !   2:  9adb4bcccb6 gvfs: start by adding the -gvfs suffix to the version
    @@ GIT-VERSION-GEN
      #!/bin/sh
      
      GVF=GIT-VERSION-FILE
    --DEF_VER=v2.26.0
    -+DEF_VER=v2.26.0.vfs.1.1
    +-DEF_VER=v2.27.0-rc1
    ++DEF_VER=v2.27.0.vfs.1.1
      
      LF='
      '
  3:  b00b12c7ab6 =   3:  f0b291bac8b gvfs: ensure that the version is based on a GVFS tag
  4:  6e4134d1428 =   4:  941a2f67f7f gvfs: add a GVFS-specific header file
  5:  ee42b60b0c4 =   5:  3038fcfedce gvfs: add the core.gvfs config setting
  6:  5b2464cf18c =   6:  e492450c32b gvfs: add the feature to skip writing the index' SHA-1
  7:  d807b2074df =   7:  e9a97d319d4 gvfs: add the feature that blobs may be missing
  8:  d7e1f19ac16 =   8:  ac7b2bae8b8 gvfs: prevent files to be deleted outside the sparse checkout
  9:  435be2e5c31 =   9:  cf19eaab437 gvfs: optionally skip reachability checks/upload pack during fetch
 10:  8ccff72fa4f =  10:  7098ea9c1ae gvfs: ensure all filters and EOL conversions are blocked
 11:  8396af71ab5 !  11:  51639856d33 Add a new run_hook_argv() function
     (context diff)
 12:  f1f796f6d91 =  12:  1db4129a7ae gvfs: allow "virtualizing" objects
 13:  751b9711dc5 =  13:  729ebdfbdd7 Hydrate missing loose objects in check_and_freshen()
 14:  8d92e3758ed =  14:  c0df14562be Add support for read-object as a background process to retrieve missing objects
 15:  7e5b9965604 =  15:  44882566f63 sha1_file: when writing objects, skip the read_object_hook

These three commits got squashed together somehow, it seems:

 16:  a156dc72faa !  16:  61a129643b7 gvfs: add global command pre and post hook procs
 17:  f2315823911 <   -:  ----------- Allow hooks to be run before setup_git_directory()
 18:  7127b5bbe44 <   -:  ----------- gvfs: introduce pre/post command hooks
 19:  ad6d21d5cdf =  17:  b010bce2049 t0400: verify that the hook is called correctly from a subdirectory
 22:  4a0851a5e3f =  18:  02de25a9061 Pass PID of git process to hooks.
 24:  4475dfbd8c6 =  19:  68a07e7c034 pre-command: always respect core.hooksPath
 20:  fc961801c24 =  20:  e444174a212 sparse-checkout: update files with a modify/delete conflict
 21:  743d05cacc8 =  21:  119dca3c739 sparse-checkout: avoid writing entries with the skip-worktree bit
 23:  69a2d504d03 =  22:  a00e2465a72 Fix reset when using the sparse-checkout feature.
 25:  f000f1281db !  23:  67c2365eda1 Do not remove files outside the sparse-checkout
       (context diff)
 26:  f2532500c9d !  24:  c81881b948c gvfs: refactor loading the core.gvfs config value
      (context diff)
 45:  ef9c1332a99 !  25:  553b0f07de7 send-pack: do not check for sha1 file when GVFS_MISSING_OK set
     (context diff)
 27:  bf5d4790129 =  26:  3f92c372161 cache-tree: remove use of strbuf_addf in update_one
 46:  8bdfdd7d025 !  27:  d6e3d7b174e gvfs: block unsupported commands when running in a GVFS repo
     (context diff)
136:  5f21f2965c3 =  28:  763bc22f57e gvfs: allow overriding core.gvfs
 47:  d7ee1a74220 =  29:  628e4e64cb3 BRANCHES.md: Add explanation of branches and using forks
108:  b678529b33f =  30:  49e8a3a0e50 vfs: disable `git update-git-for-windows`
 32:  4059f12b5c3 !  31:  d7a585f4f73 Add virtual file system settings and hook proc
    (I think some things got squashed into here.)
 33:  895fe5e3d2c =  32:  861057da458 Update the virtualfilesystem support
 34:  2148bb04570 =  33:  db86736131a virtualfilesystem: don't run the virtual file system hook if the index has been redirected
 35:  3bd29cb0b4a =  34:  244ac8f540b virtualfilesystem: fix bug with symlinks being ignored
 36:  78e717d29dd =  35:  40f3e3138ee virtualfilesystem: check if directory is included
 37:  52d774059fc =  36:  0fc5478c5e9 vfs: fix case where directories not handled correctly
 72:  b281fa681ef =  37:  397e9b8f44b backwards-compatibility: support the post-indexchanged hook
 28:  4873f397d42 !  38:  8a0a4758b87 status: add status serialization mechanism
    (context diff)
 29:  a363d336b1b !  39:  2ff4d62da89 Teach ahead-behind and serialized status to play nicely together
   (context diff)
 30:  8de43dbc264 !  40:  25434bc68a7 status: serialize to path
  (context diff)
 31:  d721b7602a6 !  41:  b9a2b7f7f8d status: reject deserialize in V2 and conflicts
  (context diff)

The following commit was dropped because it is now non-functional:

 38:  10daf3c37b6 <   -:  ----------- commit: add generation to pop_most_recent_commit()
 39:  e6c9336e0c8 =  42:  60e942e601f status: fix rename reporting when using serialization cache
 40:  98140ad161b <   -:  ----------- status: add comments for ahead_behind_flags in serialization
  (must have been dropped due to rearranging of commits.)
 41:  0cc87e84224 =  43:  01a5c8ae9dc serialize-status: serialize global and repo-local exclude file metadata
 42:  01d5d88321c =  44:  7ba4ae2677d status: deserialization wait

This one is dropped on purpose because the legacy stash is removed:

 43:  e299835d3f9 <   -:  ----------- rebase/stash: make post-command hook work again
 66:  29927d9d477 =  45:  06b89c71866 merge-recursive: avoid confusing logic in was_dirty()
 67:  09ca36beb5a =  46:  02e7028f6e2 merge-recursive: add some defensive coding to was_dirty()
 68:  fcc1e452ecf =  47:  a6b5181c4be merge-recursive: teach was_dirty() about the virtualfilesystem
 69:  052c036e84a !  48:  d4f2eeb0186 status: deserialize with -uno does not print correct hint
    (this one changed because it is reordered with a trace2 commit.)
131:  14260177188 =  49:  62ac958457e wt-status-deserialize: fix crash when -v is used
 97:  fedd7a05315 =  50:  6e2b3c6d280 fsmonitor: check CE_FSMONITOR_VALID in ce_uptodate
 98:  8eb82167ab9 =  51:  48785c03f76 fsmonitor: add script for debugging and update script for tests
132:  5999de11377 !  52:  e206375a8ad status: disable deserialize when verbose output requested.
   (context diff)
133:  509f9cd2815 =  53:  4accd778719 t7524: add test for verbose status deserialzation
144:  bce52d9066b !  54:  3e7477f5363 deserialize-status: silently fallback if we cannot read cache file
   (this one changed because it is reordered with a trace2 change)
 48:  2bae4005fc4 =  55:  a6751b3cd33 gvfs:trace2:data: add trace2 tracing around read_object_process
 49:  9110266124d !  56:  2a98d368c66 gvfs:trace2:data: status deserialization information
  (this is the trace2 change that conflicts with the deserialize-status stuff)
 50:  5bb3b37531e =  57:  ea817403d4a gvfs:trace2:data: status serialization
 51:  b46dbcb620e =  58:  8124c10ec2d gvfs:trace2:data: add vfs stats
 52:  1826c2182aa =  59:  bddee9e956a trace2: refactor setting process starting time
 53:  57a1c771221 =  60:  11208c0cb89 trace2:gvfs:experiment: clear_ce_flags_1
 54:  0225e8102ae =  61:  33df88f1304 trace2:gvfs:experiment: traverse_trees
 55:  2f0407cb0c1 =  62:  a16ad6c05e5 trace2:gvfs:experiment: report_tracking
 56:  dd8830f18c8 =  63:  f9bb66b0346 trace2:gvfs:experiment: read_cache: annotate thread usage in read-cache
 57:  f7b1bf9f835 =  64:  e1fa766bd85 trace2:gvfs:experiment: read-cache: time read/write of cache-tree extension
 58:  8107736e000 =  65:  a0c43ec762b trace2:gvfs:experiment: add prime_cache_tree region
 59:  1744c520d1e =  66:  d0e0cc6319a trace2:gvfs:experiment: add region to apply_virtualfilesystem()
 60:  9a04644e14f !  67:  4a66b264469 trace2:gvfs:experiment: add region around unpack_trees()
    (context diff)
 61:  ff72101463e =  68:  2f839a9c130 trace2:gvfs:experiment: add region to cache_tree_fully_valid()
 62:  900d0a2db58 !  69:  e7767c4bf72 trace2:gvfs:experiment: add unpack_entry() counter to unpack_trees() and report_tracking()
   (context diff. an earlier version had a whitespace problem, but it is now fixed.)
 63:  106957a9fa4 =  70:  565fc795d93 trace2:gvfs:experiment: increase default event depth for unpack-tree data
 64:  b24a7c78d0c !  71:  6ee7715c068 trace2:gvfs:experiment: add data for check_updates() in unpack_trees()
(context diff)
 65:  45efaa3088d =  72:  482eff83373 Trace2:gvfs:experiment: capture more 'tracking' details
 73:  c335c6057ad =  73:  0f468ae956b credential: set trace2_child_class for credential manager children
 74:  a1a53f11113 =  74:  5d6d72c471f sub-process: do not borrow cmd pointer from caller
 75:  6dc242dd013 =  75:  5b5ee3ed6ec sub-process: add subprocess_start_argv()
 76:  a90d8aa84fc =  76:  5affe0580bb sha1-file: add function to update existing loose object cache
 77:  1bc5c4c2ff7 =  77:  4e4988b8e73 packfile: add install_packed_git_and_mru()
 78:  0dd9d845932 =  78:  7c9405ffbc7 index-pack: avoid immediate object fetch while parsing packfile
 79:  9f6a8f6c9f9 !  79:  2292a05a551 gvfs-helper: create tool to fetch objects using the GVFS Protocol
    (this commit is very different because I squashed some rename commits to make it compile.)
 80:  0dd734c778d =  80:  c1eb2a8c239 gvfs-helper: fix race condition when creating loose object dirs
 81:  1f28ede3b06 !  81:  6aaf6d96454 sha1-file: create shared-cache directory if it doesn't exist
     (more fallout from rename stuff.)
 85:  e8368a9040f =  82:  c69dbbe0738 gvfs-helper: better handling of network errors
 86:  92a38d19846 =  83:  9ed61a0a150 gvfs-helper-client: properly update loose cache with fetched OID
 87:  a0f5456e3c7 =  84:  9ff6bab8a98 gvfs-helper: V2 robust retry and throttling
 88:  2a3dbe71006 !  85:  b51cf7364fa gvfs-helper: expose gvfs/objects GET and POST semantics
      (rename fallout in context lines)
 89:  98eeef92192 =  86:  d31e1ff14ae gvfs-helper: dramatically reduce progress noise
 90:  59b28ef04b4 =  87:  fe55ce94fbe gvfs-helper-client.h: define struct object_id
 91:  11a513d5f2a =  88:  06c85dafa9e gvfs-helper: handle pack-file after single POST request
 92:  76cc36ada07 !  89:  fd012c87444 test-gvfs-prococol, t5799: tests for gvfs-helper
      (context diff)
 94:  6c3e99719db =  90:  fade0251815 gvfs-helper: move result-list construction into install functions
 95:  f9d9fc09acb =  91:  dad8e0d3ebe t5799: add support for POST to return either a loose object or packfile
 96:  afe1f2a2c11 =  92:  579e2e42d3d t5799: cleanup wc-l and grep-c lines
 99:  1da3d9d33d1 =  93:  f67bb46f19b gvfs-helper: add prefetch support
100:  3fa2346caea =  94:  c997131b5a3 gvfs-helper: add prefetch .keep file for last packfile
101:  f1580cfb62e =  95:  8e928b68f69 gvfs-helper: do one read in my_copy_fd_len_tail()
102:  11034864d21 =  96:  7c76a7efddd gvfs-helper: move content-type warning for prefetch packs
103:  a654a183357 !  97:  091a7c38140 fetch: use gvfs-helper prefetch under config
    (context change)
104:  cdacb9b176b =  98:  19b3901dcc6 gvfs-helper: better support for concurrent packfile fetches
107:  7983e855f68 =  99:  2fd2d9231ff remote-curl: do not call fetch-pack when using gvfs-helper
110:  fd45198ca24 ! 100:  77d656e1ba8 fetch: reprepare packs before checking connectivity
   9context change)
105:  396182d71fb = 101:  43ea31e10cc gvfs-helper: retry when creating temp files
138:  66d6bc075a8 = 102:  dd429fadd28 gvfs-helper: fix support for NTLM
140:  332eba3d309 = 103:  19237509e10 gvfs-helper: cleanup NTLM fix
 71:  64aaeb42005 = 104:  1e29bdb70e4 upload-pack: fix race condition in error messages
 44:  169bfebb1c6 = 105:  1ce8ab5f6c1 fsck: use ERROR_MULTI_PACK_INDEX

The rest of the commits are dropped.

These were squashed into the first gvfs-helper commit:

 82:  35ccb65dca0 <   -:  ----------- gvfs-helper-client: rename ghs__ symbols to gh_server__
 83:  8dd82e113bb <   -:  ----------- gvfs-helper-client: rename ghs__chosen_odb to gh_client__chosen_odb for clarity
 84:  3b5b8730934 <   -:  ----------- gvfs-helper-client: rename ghc__ symbols to gh_client__ for clarity

These were all introduced upstream, or are no longer needed because of upstream changes:

 70:  26d594b083e <   -:  ----------- t5516: relax error message pattern
 93:  f0f7cfc3263 <   -:  ----------- t/helper/.gitignore: add test-gvfs-procotol
106:  79dc6584cd7 <   -:  ----------- Revert "sparse-checkout: check for dirty status"
109:  51b804b57b0 <   -:  ----------- diff: skip batch object download when possible
111:  031ba55b6b4 <   -:  ----------- unpack-trees: fix minor typo in comment
112:  d7dc1e1668f <   -:  ----------- unpack-trees: remove unused error type
113:  d61633ae186 <   -:  ----------- unpack-trees: simplify verify_absent_sparse()
114:  fa0bde45cde <   -:  ----------- unpack-trees: simplify pattern_list freeing
115:  72064ee578a <   -:  ----------- t1091: make some tests a little more defensive against failures
116:  b0a5a12a603 <   -:  ----------- unpack-trees: allow check_updates() to work on a different index
117:  3cc7c50402c <   -:  ----------- unpack-trees: do not mark a dirty path with SKIP_WORKTREE
118:  30e89c12f0a <   -:  ----------- unpack-trees: pull sparse-checkout pattern reading into a new function
119:  7af7a25853c <   -:  ----------- unpack-trees: add a new update_sparsity() function
120:  f56f31af030 <   -:  ----------- sparse-checkout: use new update_sparsity() function
121:  4ee5d50fc39 <   -:  ----------- sparse-checkout: use improved unpack_trees porcelain messages
122:  cd002c15611 <   -:  ----------- unpack-trees: move ERROR_WOULD_LOSE_SUBMODULE earlier
123:  1ac83f42da6 <   -:  ----------- unpack-trees: rename ERROR_* fields meant for warnings to WARNING_*
124:  6271d77cb1c <   -:  ----------- unpack-trees: split display_error_msgs() into two
125:  22ab0b37d85 <   -:  ----------- unpack-trees: make sparse path messages sound like warnings
126:  ebb568b9e25 <   -:  ----------- unpack-trees: provide warnings on sparse updates for unmerged paths too
127:  681c637b4ae <   -:  ----------- unpack-trees: failure to set SKIP_WORKTREE bits always just a warning
128:  5644ca28cde <   -:  ----------- sparse-checkout: provide a new reapply subcommand
129:  24e26ecda63 <   -:  ----------- t5319: replace 'touch -m' with 'test-tool chmtime'
130:  56a312695fe <   -:  ----------- commit-graph: fix buggy --expire-time option
134:  b1552d7ee25 <   -:  ----------- fixup! Add virtual file system settings and hook proc
135:  fc7c2e1823e <   -:  ----------- fixup! status: reject deserialize in V2 and conflicts
137:  7d32b5f4e41 <   -:  ----------- mingw: improve performance of mingw_unlink()
139:  c148393d1c7 <   -:  ----------- macOS/brew: let the build find gettext headers/libraries/msgfmt
141:  0eeb3be4c4b <   -:  ----------- unpack-trees: avoid array out-of-bounds error
142:  bec03347917 <   -:  ----------- ci: avoid pounding on the poor ci-artifacts container
143:  306728b321c <   -:  ----------- fixup! Revert "sparse-checkout: check for dirty status"

@dscho
Copy link
Member

dscho commented May 19, 2020

    + 		memset(&pl, 0, sizeof(pl));
    +-		free_pattern_list = 1;
    +-		populate_from_existing_patterns(o, &pl);
    ++			free_pattern_list = 1;
     +		if (core_virtualfilesystem)

That looks like an inadvertent indentation change.

@dscho
Copy link
Member

dscho commented May 19, 2020

That looks like an inadvertent indentation change.

And it looks that way in the over-all diff, too: https://github.com/microsoft/git/pull/271/files#diff-98e4472df34c789adc5b2d67f64e540eL1589-R1621

38: 10daf3c < -: ---------- commit: add generation to pop_most_recent_commit()

I don't find that commit upstream... Was it intentional to drop this from vfs-2.27.0? I see it in vfs-2.26.2...

40: 98140ad < -: ---------- status: add comments for ahead_behind_flags in serialization

Likewise this commit...

43: e299835 < -: ---------- rebase/stash: make post-command hook work again
44: 169bfeb < -: ---------- fsck: use ERROR_MULTI_PACK_INDEX

And these two...

The "skip batch object download when possible" was also done upstream.

Are you sure? I do not see any equivalent for this upstream. More concretely:

I wonder if this commit can be dropped entirely.

108:  b678529b33 =  98:  e5264547af vfs: disable `git update-git-for-windows`
109:  51b804b57b !  99:  a20e7f7ad7 diff: skip batch object download when possible
    @@ diff.c: void diff_setup_done(struct diff_options *options)
      	FREE_AND_NULL(options->parseopts);
      }
      
    -@@ diff.c: static void add_if_missing(struct repository *r,
    - 
    - void diffcore_std(struct diff_options *options)
    - {
    --	if (options->repo == the_repository && has_promisor_remote()) {

I see this in upstream's master:

        if (options->repo == the_repository && has_promisor_remote() &&
            (options->output_format & output_formats_to_prefetch ||
             options->pickaxe_opts & DIFF_PICKAXE_KINDS_MASK))

I guess the output_formats_to_prefetch condition is supposed to do that? But I only see that it says

        int output_formats_to_prefetch = DIFF_FORMAT_DIFFSTAT |
                DIFF_FORMAT_NUMSTAT |
                DIFF_FORMAT_PATCH |
                DIFF_FORMAT_SHORTSTAT |
                DIFF_FORMAT_DIRSTAT;

But your original patch did this:

commit 51b804b57b04480128d91381c6976b999bbc9ce7
Author: Derrick Stolee <dstolee@microsoft.com>
Date:   Mon Jan 6 15:39:50 2020 -0500

    diff: skip batch object download when possible

    When computing changed-path Bloom filters or performing a name-only
    diff, we do not need the blob contents before completing the diff
    values. Thus, we do not need to download a pack containing the blobs
    we do not have on-disk before completing our diff calculation.

    This prevents downloading every blob in a partial clone during
    "git log --raw" and "git diff --name-only" commands.

    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>

diff --git a/diff.c b/diff.c
index f2cfbf2214a2..7a5f8b4bbc56 100644
--- a/diff.c
+++ b/diff.c
@@ -4630,6 +4630,11 @@ void diff_setup_done(struct diff_options *options)
        if (!options->use_color || external_diff())
                options->color_moved = 0;

+       if (!(options->output_format & ~(DIFF_FORMAT_NAME |
+                                        DIFF_FORMAT_RAW)) &&
+           !options->detect_rename)
+               options->skip_batch_download_objects = 1;
+
        FREE_AND_NULL(options->parseopts);
 }

@@ -6504,7 +6509,9 @@ static void add_if_missing(struct repository *r,

 void diffcore_std(struct diff_options *options)
 {
-       if (options->repo == the_repository && has_promisor_remote()) {
+       if (!options->skip_batch_download_objects &&
+           options->repo == the_repository &&
+           has_promisor_remote()) {
                /*
                 * Prefetch the diff pairs that are about to be flushed.
                 */
diff --git a/diff.h b/diff.h
index 6febe7e3656a..89131a185a45 100644
--- a/diff.h
+++ b/diff.h
@@ -281,6 +281,7 @@ struct diff_options {
        int show_rename_progress;
        int dirstat_permille;
        int setup;
+       int skip_batch_download_objects;

        /* Number of hexdigits to abbreviate raw format output to. */
        int abbrev;

In other words, I do not think that upstream has this: if only --name or --raw is in effect, and if we don't try to detect renames, we skip downloading objects.

(I could imagine that this logic is only sound if tree objects have been fetched already, but that is beside the point here: we do not want to regress just because we inadvertently drop (parts of) patches when rebasing.)

But what I see upstream is a slightly different logic: instead of a negative logic it has a positive one. Granted, it does handle --summary as "does not need downloading". However, I think that upstream might mishandle rename detection: if it is active and --summary is in effect, we need the blobs.

But yes, the surviving version of your patch only ever sets skip_batch_download_objects but never consumes that setting, so it is a no-op in its current form.

-+	if (!options->skip_batch_download_objects &&
-+	    options->repo == the_repository &&
-+	    has_promisor_remote()) {
- 		/*
- 		 * Prefetch the diff pairs that are about to be flushed.
- 		 */
 
  ## diff.h ##
 @@ diff.h: struct diff_options {

@dscho
Copy link
Member

dscho commented May 19, 2020

40: 98140ad < -: ---------- status: add comments for ahead_behind_flags in serialization

Likewise this commit...

Ah, I think I see it here:

    +@@ wt-status-deserialize.c: static int wt_deserialize_fd(const struct wt_status *cmd_s, struct wt_status *de
    + 	/* show_branch */
    + 	/* show_stash */
    + 	/* hints */
    ++	/* ahead_behind_flags */
    + 	if (cmd_s->detect_rename != des_s->detect_rename) {
    + 		trace_printf_key(&trace_deserialize, "reject: detect_rename");
    + 		return DESERIALIZE_ERR;
     @@ wt-status-deserialize.c: static int wt_deserialize_fd(const struct wt_status *cmd_s, struct wt_status *de
      	des_s->show_branch = cmd_s->show_branch;
      	des_s->show_stash = cmd_s->show_stash;
    @@ wt-status-deserialize.c: static int wt_deserialize_fd(const struct wt_status *cm
      /*
       * Read raw serialized status data from the given file
       *
    +
    + ## wt-status-serialize.c ##
    +@@ wt-status-serialize.c: static void wt_serialize_v1_header(struct wt_status *s, int fd)
    + 	/* show_branch */
    + 	/* show_stash */
    + 	packet_write_fmt(fd, "hints %d\n", s->hints);
    ++	/* ahead_behind_flags */
    + 	packet_write_fmt(fd, "detect_rename %d\n", s->detect_rename);
    + 	packet_write_fmt(fd, "rename_score %d\n", s->rename_score);
    + 	packet_write_fmt(fd, "rename_limit %d\n", s->rename_limit);

IOW it was squashed into 1ae89a5.

@dscho
Copy link
Member

dscho commented May 19, 2020

43: e299835 < -: ---------- rebase/stash: make post-command hook work again

This is actually no longer necessary, as git-legacy-stash was removed.

44: 169bfeb < -: ---------- fsck: use ERROR_MULTI_PACK_INDEX

But I am actually certain that this is still needed, after inspecting the commit and its context (the rationale in the commit message still makes sense to me, too).

@dscho
Copy link
Member

dscho commented May 20, 2020

109: 51b804b ! 99: a20e7f7ad7 diff: skip batch object download when possible

I gave this some thought, and I thought the best would be to do this:

Subject: [PATCH] fixup! diff: skip batch object download when possible

---
 diff.c | 11 ++++++-----
 diff.h |  1 -
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/diff.c b/diff.c
index 0d5918dfc244..86a674b6b0d5 100644
--- a/diff.c
+++ b/diff.c
@@ -4666,11 +4666,6 @@ void diff_setup_done(struct diff_options *options)
 	if (!options->use_color || external_diff())
 		options->color_moved = 0;
 
-	if (!(options->output_format & ~(DIFF_FORMAT_NAME |
-					 DIFF_FORMAT_RAW)) &&
-	    !options->detect_rename)
-		options->skip_batch_download_objects = 1;
-
 	FREE_AND_NULL(options->parseopts);
 }
 
@@ -6578,6 +6573,12 @@ void diffcore_std(struct diff_options *options)
 		DIFF_FORMAT_SHORTSTAT |
 		DIFF_FORMAT_DIRSTAT;
 
+	if (options->detect_rename)
+		output_formats_to_prefetch |=
+			DIFF_FORMAT_DIFFSTAT |
+			DIFF_FORMAT_SUMMARY |
+			DIFF_FORMAT_NAME_STATUS;
+
 	/*
 	 * Check if the user requested a blob-data-requiring diff output and/or
 	 * break-rewrite detection (which requires blob data). If yes, prefetch
diff --git a/diff.h b/diff.h
index e9f104309c45..9443dc1b0039 100644
--- a/diff.h
+++ b/diff.h
@@ -281,7 +281,6 @@ struct diff_options {
 	int show_rename_progress;
 	int dirstat_permille;
 	int setup;
-	int skip_batch_download_objects;
 
 	/* Number of hexdigits to abbreviate raw format output to. */
 	int abbrev;
-- 
2.27.0.rc0.windows.1

However, then I finally did what I should have done in the first place and looked at the history: git log -L :diffcore_std:diff.c upstream/pu spits out as first commit: 95acf11

The commit message clearly describes that diffcore_rename() was taught to prefetch objects as needed (it is actually not diffcore_rename() but estimate_similarity() that was taught that trick, but that's a minor detail).

In other words: I am now finally convinced that you were right all along, @derrickstolee, and this commit can be dropped now.

@dscho
Copy link
Member

dscho commented May 20, 2020

@derrickstolee I spent a little bit of time on these patches and I think I found good spots for the two dropped commits, and I reintroduced a couple of those merge commits that structure the gvfs-helper patches a bit. I pushed the result to tentative/vfs-2.27.0-dscho. Here is the range-diff (which says nothing about the merge commits, of course):

 1:  60057db0c6de !  1:  bda47e55292e Add virtual file system settings and hook proc
    @@ unpack-trees.c: static int clear_ce_flags_1(struct index_state *istate,
      			break;
      
     @@ unpack-trees.c: int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
    - 		o->skip_sparse_checkout = 1;
      	if (!o->skip_sparse_checkout && !o->pl) {
      		memset(&pl, 0, sizeof(pl));
    --		free_pattern_list = 1;
    + 		free_pattern_list = 1;
     -		populate_from_existing_patterns(o, &pl);
    -+			free_pattern_list = 1;
     +		if (core_virtualfilesystem)
     +			o->pl = &pl;
     +		else
 2:  3a3637085ddc =  2:  d77e1086affa Update the virtualfilesystem support
 3:  34a4c69ff060 =  3:  65eadb52e154 virtualfilesystem: don't run the virtual file system hook if the index has been redirected
 4:  d494ca7ba219 =  4:  63f25c88b045 virtualfilesystem: fix bug with symlinks being ignored
 5:  f92a1caba565 =  5:  d1a57bae55dd virtualfilesystem: check if directory is included
 6:  8e6600dbd80a =  6:  a1f0fcd9aecb vfs: fix case where directories not handled correctly
 -:  ------------ >  7:  b2422f693353 commit: add generation to pop_most_recent_commit()
 7:  177e98b6efb5 =  8:  e29119f0b1b2 status: fix rename reporting when using serialization cache
 8:  230717efb3ef =  9:  d3189f59b22e serialize-status: serialize global and repo-local exclude file metadata
 9:  2b761a86c104 = 10:  804bc0329659 status: deserialization wait
 -:  ------------ > 11:  e1419affb892 fsck: use ERROR_MULTI_PACK_INDEX
10:  46b1c566a690 = 12:  fcc7254e7cba send-pack: do not check for sha1 file when GVFS_MISSING_OK set
11:  2aaa76d5ea13 = 13:  24e2e71eb15b gvfs: block unsupported commands when running in a GVFS repo
12:  18cef57f5f5a = 14:  8cf1e9f774ee BRANCHES.md: Add explanation of branches and using forks
13:  85f3afc00971 = 15:  3097afee8c7d gvfs:trace2:data: add trace2 tracing around read_object_process
14:  781697fcabbb = 16:  edb8e058a297 gvfs:trace2:data: status deserialization information
15:  d010fd43eb8f = 17:  adc47699c418 gvfs:trace2:data: status serialization
16:  648138542255 = 18:  32782e1d58f3 gvfs:trace2:data: add vfs stats
17:  57d795b217ee = 19:  789829e89ec0 trace2: refactor setting process starting time
18:  6175724f37bb = 20:  696daafe70b2 trace2:gvfs:experiment: clear_ce_flags_1
19:  4938129fb5b9 = 21:  bdbc804c53a5 trace2:gvfs:experiment: traverse_trees
20:  515f6cf5c038 = 22:  cc9a4d0d0abc trace2:gvfs:experiment: report_tracking
21:  19aec9cb8a58 = 23:  6e04e0d27df7 trace2:gvfs:experiment: read_cache: annotate thread usage in read-cache
22:  d211632250a3 = 24:  32fd786d909b trace2:gvfs:experiment: read-cache: time read/write of cache-tree extension
23:  dd12b29cde81 = 25:  dfaed8597274 trace2:gvfs:experiment: add prime_cache_tree region
24:  8e6682d05624 = 26:  1b21d9d0ce22 trace2:gvfs:experiment: add region to apply_virtualfilesystem()
25:  190d3db3f0cc = 27:  454774c328cd trace2:gvfs:experiment: add region around unpack_trees()
26:  43bf3d1e200f = 28:  ca74b08dfde9 trace2:gvfs:experiment: add region to cache_tree_fully_valid()
27:  d345b007dc4f = 29:  e6b30e3ff870 trace2:gvfs:experiment: add unpack_entry() counter to unpack_trees() and report_tracking()
28:  53994bf116a4 = 30:  82fb6c9ff0be trace2:gvfs:experiment: increase default event depth for unpack-tree data
29:  ddaac561a3a5 = 31:  d4d1b58837e4 trace2:gvfs:experiment: add data for check_updates() in unpack_trees()
30:  9578ddd63407 = 32:  b4fe7915640b Trace2:gvfs:experiment: capture more 'tracking' details
31:  c8a755d8c05c = 33:  0d49a48ef674 merge-recursive: avoid confusing logic in was_dirty()
32:  a9aee8f5e273 = 34:  20366a48b105 merge-recursive: add some defensive coding to was_dirty()
33:  dca47f2fe54f = 35:  bff6152ae867 merge-recursive: teach was_dirty() about the virtualfilesystem
34:  8588d05babc5 = 36:  6a063e2db1bd status: deserialize with -uno does not print correct hint
35:  051403c8e046 = 37:  0c67e8525503 backwards-compatibility: support the post-indexchanged hook
36:  7323cd4b891c = 38:  ece19dbf3a0e credential: set trace2_child_class for credential manager children
37:  19558f896036 = 39:  4a1e8c6ea0ca sub-process: do not borrow cmd pointer from caller
38:  92f17e1da871 = 40:  9e7fe630c348 sub-process: add subprocess_start_argv()
39:  aef048d1a4b5 = 41:  43d9c88254ea sha1-file: add function to update existing loose object cache
40:  460b7fffaa96 = 42:  1d093f778150 packfile: add install_packed_git_and_mru()
41:  24956c0fd0c9 = 43:  c1f197a281b3 index-pack: avoid immediate object fetch while parsing packfile
42:  f7fb35d41762 = 44:  57d0589329ad gvfs-helper: create tool to fetch objects using the GVFS Protocol
43:  4fe854e7139a = 45:  fb6b287a7d93 gvfs-helper: fix race condition when creating loose object dirs
44:  3b2e37bdb16a = 46:  61358047086e sha1-file: create shared-cache directory if it doesn't exist
45:  98cb18be830b = 47:  6442c0a2e556 gvfs-helper: better handling of network errors
46:  d67f6e58ff7f = 48:  5a82d7817282 gvfs-helper-client: properly update loose cache with fetched OID
47:  89091de8e635 = 49:  c2601cb004af gvfs-helper: V2 robust retry and throttling
48:  094f3c58f558 = 50:  12e68d8dcaac gvfs-helper: expose gvfs/objects GET and POST semantics
49:  2e5695bb0f45 = 51:  cd7f7a4706af gvfs-helper: dramatically reduce progress noise
50:  ee98908df452 = 52:  e43adc85b0ae gvfs-helper-client.h: define struct object_id
51:  3ece43cf3e96 = 53:  bc03c6e98a43 gvfs-helper: handle pack-file after single POST request
52:  79276319c664 = 54:  3115abbc3f07 test-gvfs-prococol, t5799: tests for gvfs-helper
53:  a405bbc498b2 = 55:  42bf16339130 gvfs-helper: move result-list construction into install functions
54:  e86201efcedf = 56:  5a8e59b6cada t5799: add support for POST to return either a loose object or packfile
55:  09fc64c21428 = 57:  7213bbee9501 t5799: cleanup wc-l and grep-c lines
56:  2c9ecc01e9be = 58:  ba86dba96eee gvfs-helper: add prefetch support
57:  bce340a10080 = 59:  a10ffca9d241 gvfs-helper: add prefetch .keep file for last packfile
58:  6fd882f3b989 = 60:  8c370d6ba403 gvfs-helper: do one read in my_copy_fd_len_tail()
59:  1baf11a91efd = 61:  069f74795dc7 gvfs-helper: move content-type warning for prefetch packs
60:  0351c50090ea = 62:  e798695249f8 fetch: use gvfs-helper prefetch under config
61:  ceb698bbd17a = 63:  4c2461f66862 gvfs-helper: better support for concurrent packfile fetches
62:  73b8ec7e10c7 = 64:  6bcab7fcc018 gvfs-helper: retry when creating temp files
63:  7831d3ab92fc = 65:  d8e67241aeb4 remote-curl: do not call fetch-pack when using gvfs-helper
64:  c0bed5803e84 = 66:  d6ea48f7e636 gvfs-helper: fix support for NTLM
65:  cd68e406bb81 = 67:  35011d1a2413 gvfs-helper: cleanup NTLM fix
66:  5dc9572b7cff = 68:  d8101fdf9fb7 fsmonitor: check CE_FSMONITOR_VALID in ce_uptodate
67:  b5edcfab09f4 = 69:  adb66aa9a7ef fsmonitor: add script for debugging and update script for tests
68:  e5264547aff9 = 70:  b1552eff5408 vfs: disable `git update-git-for-windows`
69:  a20e7f7ad787 <  -:  ------------ diff: skip batch object download when possible
70:  2ff7d75757d8 = 71:  f1b492148b16 fetch: reprepare packs before checking connectivity
71:  9e27159e927b = 72:  c6a9a4f8c9c0 wt-status-deserialize: fix crash when -v is used
72:  9bafad13d582 = 73:  a77ee7cf9f1b status: disable deserialize when verbose output requested.
73:  b14c67be3087 = 74:  fe951a9ac4c7 t7524: add test for verbose status deserialzation
74:  6af83c08f26a = 75:  e3f5ba90c249 deserialize-status: silently fallback if we cannot read cache file
75:  7fb3527e8f00 = 76:  9378f53f28ef gvfs: allow overriding core.gvfs
76:  9ee9f47afca8 = 77:  2126e0986457 progress: call trace2_region_leave() only after calling _enter()

I hope that this lightens your burden; My hope is that you will find this good enough and just force-push 2126e09 to tentative/vfs-2.27.0.

@dscho
Copy link
Member

dscho commented May 20, 2020

I hope that this lightens your burden; My hope is that you will find this good enough and just force-push 2126e09 to tentative/vfs-2.27.0.

I also rebased this on top of the just-released v2.27.0-rc1 and pushed out the result as tentative/vfs-2.27.0-rc1-dscho: https://github.com/microsoft/git/commits/tentative/vfs-2.27.0-rc1-dscho

So now my hope is that you will find that branch good enough ;-)

@derrickstolee
Copy link
Collaborator Author

I hope that this lightens your burden; My hope is that you will find this good enough and just force-push 2126e09 to tentative/vfs-2.27.0.

I also rebased this on top of the just-released v2.27.0-rc1 and pushed out the result as tentative/vfs-2.27.0-rc1-dscho: https://github.com/microsoft/git/commits/tentative/vfs-2.27.0-rc1-dscho

So now my hope is that you will find that branch good enough ;-)

Thanks for this, @dscho! I will most likely take your tentative/vfs-2.27.0-rc1-dscho branch. I'll work with it locally a bit (and look through your thoughtful review at the same time).

@dscho
Copy link
Member

dscho commented May 21, 2020

Thank you!

@derrickstolee
Copy link
Collaborator Author

That looks like an inadvertent indentation change.

And it looks that way in the over-all diff, too: https://github.com/microsoft/git/pull/271/files#diff-98e4472df34c789adc5b2d67f64e540eL1589-R1621

Yes. Thanks for fixing it in your -rc1 branch.

38: 10daf3c < -: ---------- commit: add generation to pop_most_recent_commit()

I don't find that commit upstream... Was it intentional to drop this from vfs-2.27.0? I see it in vfs-2.26.2...

I did intentionally drop this, but forgot to comment about it. The commit message mentions how ref_newer() benefits from the change, but ref_newer() was moved into commit-reach.c upstream. It no longer depends on pop_most_recent_commit(). Further, in this commit, it updates all callers to use GENERATION_NUMBER_ZERO for min_generation, which does nothing.

So I would call this commit "obsolete due to upstream changes." I'll drop it from your -rc1 branch.

40: 98140ad < -: ---------- status: add comments for ahead_behind_flags in serialization

Likewise this commit...

43: e299835 < -: ---------- rebase/stash: make post-command hook work again

This patch worked for the legacy stash working with post-command hooks, but the legacy stash is removed! (And you commented that you figured that out. I'll do better with justifying my dropped patches in the future so you don't need to do that.)

44: 169bfeb < -: ---------- fsck: use ERROR_MULTI_PACK_INDEX

The fsck one isn't critical, but I did send it upstream to be sure it gets done by the next rebase. It's fine to leave in for now.

The "skip batch object download when possible" was also done upstream.

Are you sure? I do not see any equivalent for this upstream.

(You did the work to be absolutely sure we can drop it.)

@dscho
Copy link
Member

dscho commented May 21, 2020

38: 10daf3c < -: ---------- commit: add generation to pop_most_recent_commit()

I don't find that commit upstream... Was it intentional to drop this from vfs-2.27.0? I see it in vfs-2.26.2...

I did intentionally drop this, but forgot to comment about it. The commit message mentions how ref_newer() benefits from the change, but ref_newer() was moved into commit-reach.c upstream. It no longer depends on pop_most_recent_commit(). Further, in this commit, it updates all callers to use GENERATION_NUMBER_ZERO for min_generation, which does nothing.

So I would call this commit "obsolete due to upstream changes." I'll drop it from your -rc1 branch.

Thank you for the explanation!

40: 98140ad < -: ---------- status: add comments for ahead_behind_flags in serialization

Likewise this commit...

43: e299835 < -: ---------- rebase/stash: make post-command hook work again

This patch worked for the legacy stash working with post-command hooks, but the legacy stash is removed! (And you commented that you figured that out. I'll do better with justifying my dropped patches in the future so you don't need to do that.)

No worries!

44: 169bfeb < -: ---------- fsck: use ERROR_MULTI_PACK_INDEX

The fsck one isn't critical, but I did send it upstream to be sure it gets done by the next rebase. It's fine to leave in for now.

Yep, I saw that, and that's why I cherry-picked it back.

The "skip batch object download when possible" was also done upstream.

Are you sure? I do not see any equivalent for this upstream.

(You did the work to be absolutely sure we can drop it.)

So you agree? Excellent!

@derrickstolee
Copy link
Collaborator Author

I just pushed my adjustments to @dscho's -rc1 branch as tentative/vfs-2.27.0.

The only tree-diff from his HEAD to mine is the change from dropping b2422f6 commit: add generation to pop_most_recent_commit(). However, I did reorder some commits which caused the range-diff to change. Here is the range-diff for my push against the -rc2-dscho branch:

  1:  230fe5598b9 =   1:  230fe5598b9 reset --stdin: trim carriage return from the paths
  2:  e1e75861429 =   2:  9adb4bcccb6 gvfs: start by adding the -gvfs suffix to the version
  3:  dd749d81577 =   3:  f0b291bac8b gvfs: ensure that the version is based on a GVFS tag
  4:  e3569bff65f =   4:  941a2f67f7f gvfs: add a GVFS-specific header file
  5:  9cf404073bf =   5:  3038fcfedce gvfs: add the core.gvfs config setting
  6:  67d61830860 =   6:  e492450c32b gvfs: add the feature to skip writing the index' SHA-1
  7:  96108df78f4 =   7:  e9a97d319d4 gvfs: add the feature that blobs may be missing
  8:  ce95589fd26 =   8:  ac7b2bae8b8 gvfs: prevent files to be deleted outside the sparse checkout
  9:  df3a383b527 =   9:  cf19eaab437 gvfs: optionally skip reachability checks/upload pack during fetch
 10:  f9fea454562 =  10:  7098ea9c1ae gvfs: ensure all filters and EOL conversions are blocked
 11:  1dd54d0b55c =  11:  51639856d33 Add a new run_hook_argv() function
 12:  5d98a5851cc =  12:  1db4129a7ae gvfs: allow "virtualizing" objects
 13:  c1c689c49f6 =  13:  729ebdfbdd7 Hydrate missing loose objects in check_and_freshen()
 14:  cc57f214cec =  14:  c0df14562be Add support for read-object as a background process to retrieve missing objects
 15:  5d8c4c67ede =  15:  44882566f63 sha1_file: when writing objects, skip the read_object_hook
 16:  c13f795bbef =  16:  61a129643b7 gvfs: add global command pre and post hook procs
 17:  a75d4060adb =  17:  b010bce2049 t0400: verify that the hook is called correctly from a subdirectory
 18:  7e6361015e8 =  18:  02de25a9061 Pass PID of git process to hooks.
 19:  3877241b454 =  19:  68a07e7c034 pre-command: always respect core.hooksPath
 20:  8a8836598b4 =  20:  e444174a212 sparse-checkout: update files with a modify/delete conflict
 21:  77ead86d31a =  21:  119dca3c739 sparse-checkout: avoid writing entries with the skip-worktree bit
 22:  da9c1354a32 =  22:  a00e2465a72 Fix reset when using the sparse-checkout feature.
 23:  04a8a546bd0 =  23:  67c2365eda1 Do not remove files outside the sparse-checkout
 24:  3795932bb07 =  24:  c81881b948c gvfs: refactor loading the core.gvfs config value
 41:  8e7c43b9796 =  25:  553b0f07de7 send-pack: do not check for sha1 file when GVFS_MISSING_OK set
 25:  8bba7b68afa =  26:  3f92c372161 cache-tree: remove use of strbuf_addf in update_one
 42:  01e4a30087a =  27:  d6e3d7b174e gvfs: block unsupported commands when running in a GVFS repo
106:  2ddc34e10d8 =  28:  763bc22f57e gvfs: allow overriding core.gvfs
 43:  27f28595bbd =  29:  628e4e64cb3 BRANCHES.md: Add explanation of branches and using forks
100:  592bbda3386 =  30:  49e8a3a0e50 vfs: disable `git update-git-for-windows`
 30:  ed36512c221 =  31:  d7a585f4f73 Add virtual file system settings and hook proc
 31:  ff51a144c95 =  32:  861057da458 Update the virtualfilesystem support
 32:  36c6fd157f7 =  33:  db86736131a virtualfilesystem: don't run the virtual file system hook if the index has been redirected
 33:  2cf0e14edf5 =  34:  244ac8f540b virtualfilesystem: fix bug with symlinks being ignored
 34:  e1c5f58bd64 =  35:  40f3e3138ee virtualfilesystem: check if directory is included
 35:  44ba401b83d =  36:  0fc5478c5e9 vfs: fix case where directories not handled correctly
 67:  a949c98ef11 =  37:  397e9b8f44b backwards-compatibility: support the post-indexchanged hook
 26:  7b321dfb8e1 =  38:  8a0a4758b87 status: add status serialization mechanism
 27:  8747f594e22 =  39:  2ff4d62da89 Teach ahead-behind and serialized status to play nicely together
 28:  f80bb026ed4 =  40:  25434bc68a7 status: serialize to path
 29:  f903747f94f =  41:  b9a2b7f7f8d status: reject deserialize in V2 and conflicts
 36:  24403ea4c79 <   -:  ----------- commit: add generation to pop_most_recent_commit()
 37:  ff0cff38fa9 =  42:  60e942e601f status: fix rename reporting when using serialization cache
 38:  4fa69e423fb =  43:  01a5c8ae9dc serialize-status: serialize global and repo-local exclude file metadata
 39:  c2d5781ef4c =  44:  7ba4ae2677d status: deserialization wait
 62:  52b8bf867b6 =  45:  06b89c71866 merge-recursive: avoid confusing logic in was_dirty()
 63:  28149032934 =  46:  02e7028f6e2 merge-recursive: add some defensive coding to was_dirty()
 64:  c8c44a59adc =  47:  a6b5181c4be merge-recursive: teach was_dirty() about the virtualfilesystem
 65:  3d24d6125b0 !  48:  d4f2eeb0186 status: deserialize with -uno does not print correct hint
    @@ wt-status-deserialize.c: static int wt_deserialize_v1(const struct wt_status *cm
      	*/
     -	if (validate_untracked_files_arg(cmd_s->show_untracked_files, s->show_untracked_files, &untracked_strategy)) {
     +	if (validate_untracked_files_arg(cmd_s->show_untracked_files, &s->show_untracked_files, &untracked_strategy)) {
    - 		set_deserialize_reject_reason("args/untracked-files");
      		trace_printf_key(&trace_deserialize, "reject: show_untracked_file: command: %d, serialized : %d",
      				cmd_s->show_untracked_files,
    + 				s->show_untracked_files);
102:  3bc7641e91b =  49:  62ac958457e wt-status-deserialize: fix crash when -v is used
 98:  0bd922d720d =  50:  6e2b3c6d280 fsmonitor: check CE_FSMONITOR_VALID in ce_uptodate
 99:  40de6f107a2 =  51:  48785c03f76 fsmonitor: add script for debugging and update script for tests
103:  6c8fb856533 !  52:  e206375a8ad status: disable deserialize when verbose output requested.
    @@ builtin/commit.c: int cmd_status(int argc, const char **argv, const char *prefix
     +
      	if (try_deserialize)
      		goto skip_init;
    - 	/*
    + 
104:  bf070435870 =  53:  4accd778719 t7524: add test for verbose status deserialzation
105:  6a4c177374f !  54:  3e7477f5363 deserialize-status: silently fallback if we cannot read cache file
    @@ builtin/commit.c: static int opt_parse_deserialize(const struct option *opt, con
      			deserialize_path = xstrdup(arg);
      		}
     -		if (deserialize_path && *deserialize_path
    --		    && (wt_status_deserialize_access(deserialize_path, R_OK) != 0))
    +-		    && (access(deserialize_path, R_OK) != 0))
     -			die("cannot find serialization file '%s'",
     -			    deserialize_path);
     -
     -		do_explicit_deserialize = 1;
     +		if (!deserialize_path || !*deserialize_path)
     +			do_explicit_deserialize = 1; /* read stdin */
    -+		else if (wt_status_deserialize_access(deserialize_path, R_OK) == 0)
    ++		else if (access(deserialize_path, R_OK) == 0)
     +			do_explicit_deserialize = 1; /* can read from this file */
     +		else {
     +			/*
 44:  9c5580c3801 =  55:  a6751b3cd33 gvfs:trace2:data: add trace2 tracing around read_object_process
 45:  ceee7fe10a4 !  56:  2a98d368c66 gvfs:trace2:data: status deserialization information
    @@ builtin/commit.c: static int opt_parse_porcelain(const struct option *opt, const
      static int do_explicit_deserialize = 0;
      static char *deserialize_path = NULL;
     @@ builtin/commit.c: static int opt_parse_deserialize(const struct option *opt, const char *arg, int
    - 			deserialize_path = xstrdup(arg);
      		}
    - 		if (deserialize_path && *deserialize_path
    --		    && (access(deserialize_path, R_OK) != 0))
    -+		    && (wt_status_deserialize_access(deserialize_path, R_OK) != 0))
    - 			die("cannot find serialization file '%s'",
    - 			    deserialize_path);
    - 
    + 		if (!deserialize_path || !*deserialize_path)
    + 			do_explicit_deserialize = 1; /* read stdin */
    +-		else if (access(deserialize_path, R_OK) == 0)
    ++		else if (wt_status_deserialize_access(deserialize_path, R_OK) == 0)
    + 			do_explicit_deserialize = 1; /* can read from this file */
    + 		else {
    + 			/*
     @@ builtin/commit.c: static int git_status_config(const char *k, const char *v, void *cb)
      		if (v && *v && access(v, R_OK) == 0) {
      			do_implicit_deserialize = 1;
    @@ builtin/commit.c: static int git_status_config(const char *k, const char *v, voi
      		return 0;
      	}
     @@ builtin/commit.c: int cmd_status(int argc, const char **argv, const char *prefix)
    - 			   (do_implicit_deserialize || do_explicit_deserialize));
    + 
      	if (try_deserialize)
      		goto skip_init;
     +	/*
    @@ wt-status-deserialize.c: static int wt_deserialize_v1_changed_items(const struct
     @@ wt-status-deserialize.c: static int wt_deserialize_v1(const struct wt_status *cmd_s, struct wt_status *s,
      	 * the serialized data
      	*/
    - 	if (validate_untracked_files_arg(cmd_s->show_untracked_files, s->show_untracked_files, &untracked_strategy)) {
    + 	if (validate_untracked_files_arg(cmd_s->show_untracked_files, &s->show_untracked_files, &untracked_strategy)) {
     +		set_deserialize_reject_reason("args/untracked-files");
      		trace_printf_key(&trace_deserialize, "reject: show_untracked_file: command: %d, serialized : %d",
      				cmd_s->show_untracked_files,
 46:  27b018b20a9 =  57:  ea817403d4a gvfs:trace2:data: status serialization
 47:  59715f9f372 =  58:  8124c10ec2d gvfs:trace2:data: add vfs stats
 48:  56df99e3e00 =  59:  bddee9e956a trace2: refactor setting process starting time
 49:  0d8bbcb8559 =  60:  11208c0cb89 trace2:gvfs:experiment: clear_ce_flags_1
 50:  7709c8702b9 =  61:  33df88f1304 trace2:gvfs:experiment: traverse_trees
 51:  a4bc531b2e2 =  62:  a16ad6c05e5 trace2:gvfs:experiment: report_tracking
 52:  efd27430c89 =  63:  f9bb66b0346 trace2:gvfs:experiment: read_cache: annotate thread usage in read-cache
 53:  15298761545 =  64:  e1fa766bd85 trace2:gvfs:experiment: read-cache: time read/write of cache-tree extension
 54:  9dc221dcfb4 =  65:  a0c43ec762b trace2:gvfs:experiment: add prime_cache_tree region
 55:  ef0ff26a48d =  66:  d0e0cc6319a trace2:gvfs:experiment: add region to apply_virtualfilesystem()
 56:  501e78e11ae =  67:  4a66b264469 trace2:gvfs:experiment: add region around unpack_trees()
 57:  1daac44b8ed =  68:  2f839a9c130 trace2:gvfs:experiment: add region to cache_tree_fully_valid()
 58:  655ee234e82 =  69:  e7767c4bf72 trace2:gvfs:experiment: add unpack_entry() counter to unpack_trees() and report_tracking()
 59:  844a8456777 =  70:  565fc795d93 trace2:gvfs:experiment: increase default event depth for unpack-tree data
 60:  55e83eb359b =  71:  6ee7715c068 trace2:gvfs:experiment: add data for check_updates() in unpack_trees()
 61:  6ba932f911d =  72:  482eff83373 Trace2:gvfs:experiment: capture more 'tracking' details
 68:  67db2077392 =  73:  0f468ae956b credential: set trace2_child_class for credential manager children
 69:  0f25b5f6dd8 =  74:  5d6d72c471f sub-process: do not borrow cmd pointer from caller
 70:  cdc066188c7 =  75:  5b5ee3ed6ec sub-process: add subprocess_start_argv()
 71:  4b6869e3e39 =  76:  5affe0580bb sha1-file: add function to update existing loose object cache
 72:  0a0da58be8a =  77:  4e4988b8e73 packfile: add install_packed_git_and_mru()
 73:  0c73e9e00d8 =  78:  7c9405ffbc7 index-pack: avoid immediate object fetch while parsing packfile
 74:  3e79b29f95b =  79:  2292a05a551 gvfs-helper: create tool to fetch objects using the GVFS Protocol
 75:  6143b79ef50 =  80:  c1eb2a8c239 gvfs-helper: fix race condition when creating loose object dirs
 76:  8daa20f5c48 =  81:  6aaf6d96454 sha1-file: create shared-cache directory if it doesn't exist
 77:  6d794072659 =  82:  c69dbbe0738 gvfs-helper: better handling of network errors
 78:  ecbfbde2c87 =  83:  9ed61a0a150 gvfs-helper-client: properly update loose cache with fetched OID
 79:  6a4f48bd53d =  84:  9ff6bab8a98 gvfs-helper: V2 robust retry and throttling
 80:  141229e8374 =  85:  b51cf7364fa gvfs-helper: expose gvfs/objects GET and POST semantics
 81:  06234946ef7 =  86:  d31e1ff14ae gvfs-helper: dramatically reduce progress noise
 82:  e2a91da07b7 =  87:  fe55ce94fbe gvfs-helper-client.h: define struct object_id
 83:  d5537e52e48 =  88:  06c85dafa9e gvfs-helper: handle pack-file after single POST request
 84:  c653ca43692 =  89:  fd012c87444 test-gvfs-prococol, t5799: tests for gvfs-helper
 85:  32dadb76019 =  90:  fade0251815 gvfs-helper: move result-list construction into install functions
 86:  dd9d862a82c =  91:  dad8e0d3ebe t5799: add support for POST to return either a loose object or packfile
 87:  dc5f91c5b22 =  92:  579e2e42d3d t5799: cleanup wc-l and grep-c lines
 88:  d41655053de =  93:  f67bb46f19b gvfs-helper: add prefetch support
 89:  204338cac38 =  94:  c997131b5a3 gvfs-helper: add prefetch .keep file for last packfile
 90:  31ac568c8a9 =  95:  8e928b68f69 gvfs-helper: do one read in my_copy_fd_len_tail()
 91:  fea5e1673fb =  96:  7c76a7efddd gvfs-helper: move content-type warning for prefetch packs
 92:  33259e46289 =  97:  091a7c38140 fetch: use gvfs-helper prefetch under config
 93:  03f45a1970b =  98:  19b3901dcc6 gvfs-helper: better support for concurrent packfile fetches
 95:  5d7ca0268ac =  99:  2fd2d9231ff remote-curl: do not call fetch-pack when using gvfs-helper
101:  e320368e9d3 = 100:  77d656e1ba8 fetch: reprepare packs before checking connectivity
 94:  2804aa401e2 = 101:  43ea31e10cc gvfs-helper: retry when creating temp files
 96:  fada58d7c68 = 102:  dd429fadd28 gvfs-helper: fix support for NTLM
 97:  6c08fac69ef = 103:  19237509e10 gvfs-helper: cleanup NTLM fix
 66:  fee8b650838 = 104:  1e29bdb70e4 upload-pack: fix race condition in error messages
 40:  4145f0c1885 = 105:  1ce8ab5f6c1 fsck: use ERROR_MULTI_PACK_INDEX

@derrickstolee
Copy link
Collaborator Author

derrickstolee commented May 21, 2020

I updated the branch thicket to group common areas together better.

Here is the new git log --oneline --graph --boundary output (--boundary is why I edited this comment):

*   1a0ad6f9993 Merge pull request #24 Match multi-pack-index feature from upstream
|\  
| * 1ce8ab5f6c1 fsck: use ERROR_MULTI_PACK_INDEX
| * 1e29bdb70e4 upload-pack: fix race condition in error messages
|/  
*   3f334118ca5 Merge pull request #265: gvfs-helper: fix support for NTLM
|\  
| * 19237509e10 gvfs-helper: cleanup NTLM fix
| * dd429fadd28 gvfs-helper: fix support for NTLM
* | 13401c44b09 Merge pull request #227: gvfs-helper: add prefetch action
|\| 
| * 43ea31e10cc gvfs-helper: retry when creating temp files
| * 77d656e1ba8 fetch: reprepare packs before checking connectivity
| * 2fd2d9231ff remote-curl: do not call fetch-pack when using gvfs-helper
| * 19b3901dcc6 gvfs-helper: better support for concurrent packfile fetches
| * 091a7c38140 fetch: use gvfs-helper prefetch under config
| * 7c76a7efddd gvfs-helper: move content-type warning for prefetch packs
| * 8e928b68f69 gvfs-helper: do one read in my_copy_fd_len_tail()
| * c997131b5a3 gvfs-helper: add prefetch .keep file for last packfile
| * f67bb46f19b gvfs-helper: add prefetch support
* | c7b9f0de588 Merge pull request #220 from jeffhostetler/test-gvfs-helper-2.24
|\| 
| * 579e2e42d3d t5799: cleanup wc-l and grep-c lines
| * dad8e0d3ebe t5799: add support for POST to return either a loose object or packfile
| * fade0251815 gvfs-helper: move result-list construction into install functions
| * fd012c87444 test-gvfs-prococol, t5799: tests for gvfs-helper
| * 06c85dafa9e gvfs-helper: handle pack-file after single POST request
| * fe55ce94fbe gvfs-helper-client.h: define struct object_id
| * d31e1ff14ae gvfs-helper: dramatically reduce progress noise
| * b51cf7364fa gvfs-helper: expose gvfs/objects GET and POST semantics
| * 9ff6bab8a98 gvfs-helper: V2 robust retry and throttling
| * 9ed61a0a150 gvfs-helper-client: properly update loose cache with fetched OID
| * c69dbbe0738 gvfs-helper: better handling of network errors
| * 6aaf6d96454 sha1-file: create shared-cache directory if it doesn't exist
| * c1eb2a8c239 gvfs-helper: fix race condition when creating loose object dirs
| * 2292a05a551 gvfs-helper: create tool to fetch objects using the GVFS Protocol
| * 7c9405ffbc7 index-pack: avoid immediate object fetch while parsing packfile
| * 4e4988b8e73 packfile: add install_packed_git_and_mru()
| * 5affe0580bb sha1-file: add function to update existing loose object cache
| * 5b5ee3ed6ec sub-process: add subprocess_start_argv()
| * 5d6d72c471f sub-process: do not borrow cmd pointer from caller
| * 0f468ae956b credential: set trace2_child_class for credential manager children
|/  
*   b7592121b03 Merge branch 'vfs-trace2'
|\  
| * 482eff83373 Trace2:gvfs:experiment: capture more 'tracking' details
| * 6ee7715c068 trace2:gvfs:experiment: add data for check_updates() in unpack_trees()
| * 565fc795d93 trace2:gvfs:experiment: increase default event depth for unpack-tree data
| * e7767c4bf72 trace2:gvfs:experiment: add unpack_entry() counter to unpack_trees() and report_tracking()
| * 2f839a9c130 trace2:gvfs:experiment: add region to cache_tree_fully_valid()
| * 4a66b264469 trace2:gvfs:experiment: add region around unpack_trees()
| * d0e0cc6319a trace2:gvfs:experiment: add region to apply_virtualfilesystem()
| * a0c43ec762b trace2:gvfs:experiment: add prime_cache_tree region
| * e1fa766bd85 trace2:gvfs:experiment: read-cache: time read/write of cache-tree extension
| * f9bb66b0346 trace2:gvfs:experiment: read_cache: annotate thread usage in read-cache
| * a16ad6c05e5 trace2:gvfs:experiment: report_tracking
| * 33df88f1304 trace2:gvfs:experiment: traverse_trees
| * 11208c0cb89 trace2:gvfs:experiment: clear_ce_flags_1
| * bddee9e956a trace2: refactor setting process starting time
| * 8124c10ec2d gvfs:trace2:data: add vfs stats
| * ea817403d4a gvfs:trace2:data: status serialization
| * 2a98d368c66 gvfs:trace2:data: status deserialization information
| * a6751b3cd33 gvfs:trace2:data: add trace2 tracing around read_object_process
|/  
*   f621312daf3 Merge branch 'ahead-behind-and-serialized-status'
|\  
| * 3e7477f5363 deserialize-status: silently fallback if we cannot read cache file
| * 4accd778719 t7524: add test for verbose status deserialzation
| * e206375a8ad status: disable deserialize when verbose output requested.
| * 48785c03f76 fsmonitor: add script for debugging and update script for tests
| * 6e2b3c6d280 fsmonitor: check CE_FSMONITOR_VALID in ce_uptodate
| * 62ac958457e wt-status-deserialize: fix crash when -v is used
| * d4f2eeb0186 status: deserialize with -uno does not print correct hint
| * a6b5181c4be merge-recursive: teach was_dirty() about the virtualfilesystem
| * 02e7028f6e2 merge-recursive: add some defensive coding to was_dirty()
| * 06b89c71866 merge-recursive: avoid confusing logic in was_dirty()
| * 7ba4ae2677d status: deserialization wait
| * 01a5c8ae9dc serialize-status: serialize global and repo-local exclude file metadata
| * 60e942e601f status: fix rename reporting when using serialization cache
| * b9a2b7f7f8d status: reject deserialize in V2 and conflicts
| * 25434bc68a7 status: serialize to path
| * 2ff4d62da89 Teach ahead-behind and serialized status to play nicely together
| * 8a0a4758b87 status: add status serialization mechanism
|/  
*   c25708b3b04 Merge 'virtual-file-system-support'
|\  
| * 397e9b8f44b backwards-compatibility: support the post-indexchanged hook
| * 0fc5478c5e9 vfs: fix case where directories not handled correctly
| * 40f3e3138ee virtualfilesystem: check if directory is included
| * 244ac8f540b virtualfilesystem: fix bug with symlinks being ignored
| * db86736131a virtualfilesystem: don't run the virtual file system hook if the index has been redirected
| * 861057da458 Update the virtualfilesystem support
| * d7a585f4f73 Add virtual file system settings and hook proc
|/  
*   285075e826d Merge 'sparse-checkout-fixes' into HEAD
|\  
| * 49e8a3a0e50 vfs: disable `git update-git-for-windows`
| * 628e4e64cb3 BRANCHES.md: Add explanation of branches and using forks
| * 763bc22f57e gvfs: allow overriding core.gvfs
| * d6e3d7b174e gvfs: block unsupported commands when running in a GVFS repo
| * 3f92c372161 cache-tree: remove use of strbuf_addf in update_one
| * 553b0f07de7 send-pack: do not check for sha1 file when GVFS_MISSING_OK set
| * c81881b948c gvfs: refactor loading the core.gvfs config value
| * 67c2365eda1 Do not remove files outside the sparse-checkout
| * a00e2465a72 Fix reset when using the sparse-checkout feature.
| * 119dca3c739 sparse-checkout: avoid writing entries with the skip-worktree bit
| * e444174a212 sparse-checkout: update files with a modify/delete conflict
| * 68a07e7c034 pre-command: always respect core.hooksPath
| * 02de25a9061 Pass PID of git process to hooks.
| * b010bce2049 t0400: verify that the hook is called correctly from a subdirectory
| * 61a129643b7 gvfs: add global command pre and post hook procs
|/  
*   4901a177642 Merge 'read-object-hook' into HEAD
|\  
| * 44882566f63 sha1_file: when writing objects, skip the read_object_hook
| * c0df14562be Add support for read-object as a background process to retrieve missing objects
| * 729ebdfbdd7 Hydrate missing loose objects in check_and_freshen()
| * 1db4129a7ae gvfs: allow "virtualizing" objects
| * 51639856d33 Add a new run_hook_argv() function
| * 7098ea9c1ae gvfs: ensure all filters and EOL conversions are blocked
| * cf19eaab437 gvfs: optionally skip reachability checks/upload pack during fetch
| * ac7b2bae8b8 gvfs: prevent files to be deleted outside the sparse checkout
| * e9a97d319d4 gvfs: add the feature that blobs may be missing
| * e492450c32b gvfs: add the feature to skip writing the index' SHA-1
| * 3038fcfedce gvfs: add the core.gvfs config setting
| * 941a2f67f7f gvfs: add a GVFS-specific header file
| * f0b291bac8b gvfs: ensure that the version is based on a GVFS tag
| * 9adb4bcccb6 gvfs: start by adding the -gvfs suffix to the version
| * 230fe5598b9 reset --stdin: trim carriage return from the paths
|/  
o b9036e49ce9 Merge 'readme' into HEAD

and the old:

*   cd0fc65b222 Merge pull request #263: gvfs: allow overriding core.gvfs
|\  
| * 2ddc34e10d8 gvfs: allow overriding core.gvfs
|/  
*   b26b4d0bc35 Merge pull request #270 from jeffhostetler/fix-deserialize-error-vfs
|\  
| * 6a4c177374f deserialize-status: silently fallback if we cannot read cache file
* | d7e1443fa94 Merge pull request #260 from jeffhostetler/msft-verbose-status-deserialize-v226
|\| 
| * bf070435870 t7524: add test for verbose status deserialzation
| * 6c8fb856533 status: disable deserialize when verbose output requested.
| * 3bc7641e91b wt-status-deserialize: fix crash when -v is used
|/  
* e320368e9d3 fetch: reprepare packs before checking connectivity
*   63a21ac8f4f Merge pull request #243 from dscho/disable-update-gfw
|\  
| * 592bbda3386 vfs: disable `git update-git-for-windows`
|/  
*   d4ad3472e19 Merge pull request #212 fsmonitor updates for improved performance
|\  
| * 40de6f107a2 fsmonitor: add script for debugging and update script for tests
| * 0bd922d720d fsmonitor: check CE_FSMONITOR_VALID in ce_uptodate
|/  
*   92aa01986a0 Merge pull request #265: gvfs-helper: fix support for NTLM
|\  
| * 6c08fac69ef gvfs-helper: cleanup NTLM fix
| * fada58d7c68 gvfs-helper: fix support for NTLM
* | 405df23be05 Merge pull request #240: remote-https: do not call fetch-pack if using gvfs helper
|\| 
| * 5d7ca0268ac remote-curl: do not call fetch-pack when using gvfs-helper
* | 1f6c43871c5 Merge pull request #231: gvfs-helper: retry when creating temp files
|\| 
| * 2804aa401e2 gvfs-helper: retry when creating temp files
* | c588e062f36 Merge pull request #229 from jeffhostetler/gvfs-helper-lock-pack-dir
|\| 
| * 03f45a1970b gvfs-helper: better support for concurrent packfile fetches
* | 52ef3e1b318 Merge pull request #228: "gvfs-helper prefetch" during "git fetch"
|\| 
| * 33259e46289 fetch: use gvfs-helper prefetch under config
* | f7a9dce6455 Merge pull request #227: gvfs-helper: add prefetch action
|\| 
| * fea5e1673fb gvfs-helper: move content-type warning for prefetch packs
| * 31ac568c8a9 gvfs-helper: do one read in my_copy_fd_len_tail()
| * 204338cac38 gvfs-helper: add prefetch .keep file for last packfile
| * d41655053de gvfs-helper: add prefetch support
* | cefeb982290 Merge pull request #220 from jeffhostetler/test-gvfs-helper-2.24
|\| 
| * dc5f91c5b22 t5799: cleanup wc-l and grep-c lines
| * dd9d862a82c t5799: add support for POST to return either a loose object or packfile
| * 32dadb76019 gvfs-helper: move result-list construction into install functions
| * c653ca43692 test-gvfs-prococol, t5799: tests for gvfs-helper
|/  
*   aab91276cd0 Merge pull request #221: gvfs-helper: handle pack-file after single POST request
|\  
| * d5537e52e48 gvfs-helper: handle pack-file after single POST request
|/  
* e2a91da07b7 gvfs-helper-client.h: define struct object_id
* 06234946ef7 gvfs-helper: dramatically reduce progress noise
* 141229e8374 gvfs-helper: expose gvfs/objects GET and POST semantics
* 6a4f48bd53d gvfs-helper: V2 robust retry and throttling
* ecbfbde2c87 gvfs-helper-client: properly update loose cache with fetched OID
* 6d794072659 gvfs-helper: better handling of network errors
* 8daa20f5c48 sha1-file: create shared-cache directory if it doesn't exist
* 6143b79ef50 gvfs-helper: fix race condition when creating loose object dirs
* 3e79b29f95b gvfs-helper: create tool to fetch objects using the GVFS Protocol
* 0c73e9e00d8 index-pack: avoid immediate object fetch while parsing packfile
* 0a0da58be8a packfile: add install_packed_git_and_mru()
* 4b6869e3e39 sha1-file: add function to update existing loose object cache
* cdc066188c7 sub-process: add subprocess_start_argv()
* 0f25b5f6dd8 sub-process: do not borrow cmd pointer from caller
* 67db2077392 credential: set trace2_child_class for credential manager children
*   74a09238013 Merge pull request #188: upload-pack: fix race condition in error messages
|\  
| * fee8b650838 upload-pack: fix race condition in error messages
* | a949c98ef11 backwards-compatibility: support the post-indexchanged hook
* |   a6ee5bc6c73 Merge pull request #157 from jeffhostetler/vfs-222-status-cache-untracked-hint
|\ \  
| * | 3d24d6125b0 status: deserialize with -uno does not print correct hint
|/ /  
* |   02c9f2a7dbc Merge branch 'virtualfilesystem-and-merge-recursive'
|\ \  
| * | c8c44a59adc merge-recursive: teach was_dirty() about the virtualfilesystem
| * | 28149032934 merge-recursive: add some defensive coding to was_dirty()
| * | 52b8bf867b6 merge-recursive: avoid confusing logic in was_dirty()
|/ /  
* |   92aed3fa14f Merge branch 'vfs-trace2'
|\ \  
| * | 6ba932f911d Trace2:gvfs:experiment: capture more 'tracking' details
| * | 55e83eb359b trace2:gvfs:experiment: add data for check_updates() in unpack_trees()
| * | 844a8456777 trace2:gvfs:experiment: increase default event depth for unpack-tree data
| * | 655ee234e82 trace2:gvfs:experiment: add unpack_entry() counter to unpack_trees() and report_tracking()
| * | 1daac44b8ed trace2:gvfs:experiment: add region to cache_tree_fully_valid()
| * | 501e78e11ae trace2:gvfs:experiment: add region around unpack_trees()
| * | ef0ff26a48d trace2:gvfs:experiment: add region to apply_virtualfilesystem()
| * | 9dc221dcfb4 trace2:gvfs:experiment: add prime_cache_tree region
| * | 15298761545 trace2:gvfs:experiment: read-cache: time read/write of cache-tree extension
| * | efd27430c89 trace2:gvfs:experiment: read_cache: annotate thread usage in read-cache
| * | a4bc531b2e2 trace2:gvfs:experiment: report_tracking
| * | 7709c8702b9 trace2:gvfs:experiment: traverse_trees
| * | 0d8bbcb8559 trace2:gvfs:experiment: clear_ce_flags_1
| * | 56df99e3e00 trace2: refactor setting process starting time
| * | 59715f9f372 gvfs:trace2:data: add vfs stats
| * | 27b018b20a9 gvfs:trace2:data: status serialization
| * | ceee7fe10a4 gvfs:trace2:data: status deserialization information
| * | 9c5580c3801 gvfs:trace2:data: add trace2 tracing around read_object_process
|/ /  
* |   b0781e2fb3c Merge pull request #98 Add explanation of branches and using forks
|\ \  
| * | 27f28595bbd BRANCHES.md: Add explanation of branches and using forks
|/ /  
* |   a37833f9bc2 Merge pull request #91 from benpeart/block-commands
|\ \  
| * | 01e4a30087a gvfs: block unsupported commands when running in a GVFS repo
|/ /  
* |   ebc4717a6c1 Merge pull request #68 send-pack do not check for sha1 file when GVFS_MISSING_OK set
|\ \  
| * | 8e7c43b9796 send-pack: do not check for sha1 file when GVFS_MISSING_OK set
|/ /  
* |   3c84ab516ef Merge pull request #24 Match multi-pack-index feature from upstream
|\ \  
| * | 4145f0c1885 fsck: use ERROR_MULTI_PACK_INDEX
|/ /  
* |   496d73c8434 Merge pull request #7 from jeffhostetler/gvfs-status-serialize-wait
|\ \  
| * | c2d5781ef4c status: deserialization wait
|/ /  
* |   ec72e0f5b7b Merge pull request #1 from jeffhostetler/gvfs-serialize-exclude
|\ \  
| * | 4fa69e423fb serialize-status: serialize global and repo-local exclude file metadata
|/ /  
* |   561fcf743ba Merge pull request #6 from jeffhostetler/gvfs-serialize-status-rename
|\ \  
| * | ff0cff38fa9 status: fix rename reporting when using serialization cache
|/ /  
* |   8c3cc513dfd Merge 'gvfs/ds/generation-numbers-update'
|\ \  
| * | 24403ea4c79 commit: add generation to pop_most_recent_commit()
|/ /  
* |   6acfed225c5 Merge 'virtual-file-system-support'
|\ \  
| * | 44ba401b83d vfs: fix case where directories not handled correctly
| * | e1c5f58bd64 virtualfilesystem: check if directory is included
| * | 2cf0e14edf5 virtualfilesystem: fix bug with symlinks being ignored
| * | 36c6fd157f7 virtualfilesystem: don't run the virtual file system hook if the index has been redirected
| * | ff51a144c95 Update the virtualfilesystem support
| * | ed36512c221 Add virtual file system settings and hook proc
|/ /  
* |   f90d42a725a Merge branch 'ahead-behind-and-serialized-status'
|\ \  
| * | f903747f94f status: reject deserialize in V2 and conflicts
| * | f80bb026ed4 status: serialize to path
| * | 8747f594e22 Teach ahead-behind and serialized status to play nicely together
|/ /  
* |   d55cabfcf06 Merge branch 'serialize_status_gvfs'
|\ \  
| * | 7b321dfb8e1 status: add status serialization mechanism
|/ /  
* | 8bba7b68afa cache-tree: remove use of strbuf_addf in update_one
* | 3795932bb07 gvfs: refactor loading the core.gvfs config value
* |   ba5a93eea66 Merge 'sparse-checkout-fixes' into HEAD
|\ \  
| * | 04a8a546bd0 Do not remove files outside the sparse-checkout
| * | da9c1354a32 Fix reset when using the sparse-checkout feature.
| * | 77ead86d31a sparse-checkout: avoid writing entries with the skip-worktree bit
| * | 8a8836598b4 sparse-checkout: update files with a modify/delete conflict
* | | 055ba6f8f64 Merge 'pre-post-command-hooks' into HEAD
|\| | 
| * | 3877241b454 pre-command: always respect core.hooksPath
| * | 7e6361015e8 Pass PID of git process to hooks.
| * | a75d4060adb t0400: verify that the hook is called correctly from a subdirectory
| * | c13f795bbef gvfs: add global command pre and post hook procs
|/ /  
* |   4ee73fd8138 Merge 'read-object-hook' into HEAD
|\ \  
| * | 5d8c4c67ede sha1_file: when writing objects, skip the read_object_hook
| * | cc57f214cec Add support for read-object as a background process to retrieve missing objects
| * | c1c689c49f6 Hydrate missing loose objects in check_and_freshen()
| * | 5d98a5851cc gvfs: allow "virtualizing" objects
| * | 1dd54d0b55c Add a new run_hook_argv() function
|/ /  
* | f9fea454562 gvfs: ensure all filters and EOL conversions are blocked
* | df3a383b527 gvfs: optionally skip reachability checks/upload pack during fetch
* | ce95589fd26 gvfs: prevent files to be deleted outside the sparse checkout
* | 96108df78f4 gvfs: add the feature that blobs may be missing
* | 67d61830860 gvfs: add the feature to skip writing the index' SHA-1
* | 9cf404073bf gvfs: add the core.gvfs config setting
* | e3569bff65f gvfs: add a GVFS-specific header file
* | dd749d81577 gvfs: ensure that the version is based on a GVFS tag
* | e1e75861429 gvfs: start by adding the -gvfs suffix to the version
* |   432744df88c Merge 'gvfs-preamble' into HEAD
|\ \  
| |/  
|/|   
| * 230fe5598b9 reset --stdin: trim carriage return from the paths
|/  
o b9036e49ce9 Merge 'readme' into HEAD

@dscho
Copy link
Member

dscho commented May 21, 2020

Nice!

My only (very minor) nit:

This merge commit probably now wants an adjusted commit message, as does...

|\  
| * 1ce8ab5f6c1 fsck: use ERROR_MULTI_PACK_INDEX
| * 1e29bdb70e4 upload-pack: fix race condition in error messages
|/  
*   3f334118ca5 Merge pull request #265: gvfs-helper: fix support for NTLM

... this one and...

|\  
| * 19237509e10 gvfs-helper: cleanup NTLM fix
| * dd429fadd28 gvfs-helper: fix support for NTLM
* | 13401c44b09 Merge pull request #227: gvfs-helper: add prefetch action

... this one, and ...

|\| 
| * 43ea31e10cc gvfs-helper: retry when creating temp files
| * 77d656e1ba8 fetch: reprepare packs before checking connectivity
| * 2fd2d9231ff remote-curl: do not call fetch-pack when using gvfs-helper
| * 19b3901dcc6 gvfs-helper: better support for concurrent packfile fetches
| * 091a7c38140 fetch: use gvfs-helper prefetch under config
| * 7c76a7efddd gvfs-helper: move content-type warning for prefetch packs
| * 8e928b68f69 gvfs-helper: do one read in my_copy_fd_len_tail()
| * c997131b5a3 gvfs-helper: add prefetch .keep file for last packfile
| * f67bb46f19b gvfs-helper: add prefetch support
* | c7b9f0de588 Merge pull request #220 from jeffhostetler/test-gvfs-helper-2.24

... this one, too.

|\|

@derrickstolee
Copy link
Collaborator Author

This merge commit probably now wants an adjusted commit message, as does...

I noticed that, too. I did reword the merges a few times but it was early in my multiple attempts to get the graph right. I'll reword in the next rebase, now that the structure is solidified.

@dscho
Copy link
Member

dscho commented May 26, 2020

44: 169bfeb < -: ---------- fsck: use ERROR_MULTI_PACK_INDEX

The fsck one isn't critical, but I did send it upstream to be sure it gets done by the next rebase. It's fine to leave in for now.

Yep, I saw that, and that's why I cherry-picked it back.

It made it upstream, into v2.27.0-rc2, as e68a527. I rebased and force-pushed.

@dscho dscho changed the title [DO NOT MERGE] Update Git to v2.27.0 (-rc0) [DO NOT MERGE] Update Git to v2.27.0 (-rc2) May 26, 2020
@derrickstolee
Copy link
Collaborator Author

Thanks, @dscho for rebasing onto -rc2! I'll generate an installer soon and get the tests restarted in Scalar and VFS for Git.

I just wanted to point out that I pushed again after editing the merge commit message. The first-parent history now looks like this:

commit fdc68d1cfa806908cff60fd254b03583f883a65f
Merge: 2dec603067b 54d06ba55f4
Author: Johannes Schindelin <johasc@microsoft.com>
Date:   Thu Oct 18 14:03:34 2018 +0200

    Merge upstreamable patches
    
    Includes commits from these pull requests:
    
            #188
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>

commit 2dec603067beea45ba86b466a170bab95b096a96
Merge: 6b370a201f2 10edcbdf55f
Author: Derrick Stolee <dstolee@microsoft.com>
Date:   Fri May 1 12:56:59 2020 -0400

    Merge pull request #265: gvfs-helper: fix support for NTLM
    
    Fix NTLM support in gvfs-helper.
    
    NTLM is handled magically by libcurl when we CURLAUTH_ANY is enabled AND
    we passed empty username/password. This lets it negotiate with the server and
    choose the best authentication scheme.

commit 6b370a201f2a5b5319595013d2bf63fc85c66a84
Merge: be6f6307269 845795d0126
Author: Derrick Stolee <dstolee@microsoft.com>
Date:   Tue Dec 17 11:28:33 2019 -0500

    Merge gvfs-helper prefetch feature
    
    Includes these pull requests:
    
     #227
     #228
     #229
     #231
     #240
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>

commit be6f6307269f2ca8efc2410514da76c796c75e25
Merge: d249c23e24e caa79dcaf1a
Author: Jeff Hostetler <jeffhostetler@users.noreply.github.com>
Date:   Wed Nov 13 19:51:21 2019 -0500

    Merge first wave of gvfs-helper feature
    
    Includes commits from these pull requests:
    
            #191
            #205
            #206
            #207
            #208
            #215
            #220
            #221
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>

commit d249c23e24ef501560e6654bfd21e75a9b105dfa
Merge: d0a07a8100e c6a377e13e1
Author: Jeff Hostetler <jeffhost@microsoft.com>
Date:   Tue Apr 23 16:24:02 2019 -0400

    Merge trace2 experimental regions
    
    Includes gvfs-specific commits from these pull requests:
    
            #158
            #159
            #160
            #164
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>

commit d0a07a8100e0959f64c6ec84c5777880e2d136e4
Merge: 8efbf6e7fd8 71ff4fc6cf4
Author: Johannes Schindelin <johasc@microsoft.com>
Date:   Mon Jun 11 23:46:11 2018 +0200

    Merge updates to serialized status
    
    Includes these pull requests:
    
            #1
            #6
            #10
            #11
            #157
            #212
            #260
            #270
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>

commit 8efbf6e7fd8040fb8640283136449b4b4f528e7b
Merge: 95a81140e8b 362732c4fff
Author: Johannes Schindelin <johasc@microsoft.com>
Date:   Mon Jun 11 23:47:08 2018 +0200

    Merge virtualfilesystem hook
    
    Add virtual file system settings and hook proc.  On index load,
    clear/set the skip worktree bits based on the virtual file system data.
    Use virtual file system data to update skip-worktree bit in
    unpack-trees. Use virtual file system data to exclude files and folders
    not explicitly requested.
    
    The hook was first contributed in private, but was extended via the
    following pull requests:
    
            #15
            #27
            #33
            #70
    
    Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>

commit 95a81140e8b68a26b8224bbc19fd37312e3be34f
Merge: 982c0af5798 b4fbed6bc9d
Author: Johannes Schindelin <johasc@microsoft.com>
Date:   Mon Jun 11 23:45:31 2018 +0200

    Merge advanced VFS-specific features
    
    Most of these were done in private before microsoft/git. However,
    the following pull requests modified the core feature:
    
            #85
            #89
            #91
            #98
            #243
            #263
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>

commit 982c0af57983face68fd0bb0e10ae630538329c4
Merge: 2703017a6d8 5bde551908a
Author: Johannes Schindelin <johasc@microsoft.com>
Date:   Mon Jun 11 23:45:10 2018 +0200

    Merge core VFS features
    
    These were done in private, before microsoft/git.
    
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>

@dscho
Copy link
Member

dscho commented May 27, 2020

I just wanted to point out that I pushed again after editing the merge commit message. The first-parent history now looks like this:

[...]

This looks great!

Kevin Willford and others added 6 commits June 1, 2020 15:23
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 <kewillf@microsoft.com>
Signed-off-by: Saeed Noursalehi <sanoursa@microsoft.com>
Signed-off-by: Johannes Schindelin <johasc@microsoft.com>
This header file will accumulate GVFS-specific definitions.

Signed-off-by: Kevin Willford <kewillf@microsoft.com>
This does not do anything yet. The next patches will add various values
for that config setting that correspond to the various features
offered/required by GVFS.

Signed-off-by: Kevin Willford <kewillf@microsoft.com>
This takes a substantial amount of time, and if the user is reasonably
sure that the files' integrity is not compromised, that time can be saved.

Git no longer verifies the SHA-1 by default, anyway.

Signed-off-by: Kevin Willford <kewillf@microsoft.com>
derrickstolee and others added 22 commits June 1, 2020 15:23
If our POST request includes a commit ID, then the the remote will
send a pack-file containing the commit and all trees reachable from
its root tree. With the current implementation, this causes a
failure since we call install_loose() when asking for one object.

Modify the condition to check for install_pack() when the response
type changes.

Also, create a tempfile for the pack-file download or else we will
have problems!

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
…and report_tracking()

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
The gvfs-helper allows us to download prefetch packs using a simple
subprocess call. The gvfs-helper-client.h method will automatically
compute the timestamp if passing 0, and passing NULL for the number
of downloaded packs is valid.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Create t/helper/test-gvfs-protocol.c and t/t5799-gvfs-helper.sh
to test gvfs-helper.

Create t/helper/test-gvfs-protocol.c as a stand-alone web server that
speaks the GVFS Protocol [1] and serves loose objects and packfiles
to clients.  It is borrows heavily from the code in daemon.c.
It includes a "mayhem" mode to cause various network and HTTP errors
to test the retry/recovery ability of gvfs-helper.

Create t/t5799-gvfs-helper.sh to test gvfs-helper.

[1] https://github.com/microsoft/VFSForGit/blob/master/Protocol.md

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Teach gvfs-helper to better support the concurrent fetching of the
same packfile by multiple instances.

If 2 instances of gvfs-helper did a POST and requested the same set of
OIDs, they might receive the exact same packfile (same checksum SHA).
Both processes would then race to install their copy of the .pack and
.idx files into the ODB/pack directory.

This is not a problem on Unix (because of filesystem semantics).

On Windows, this can cause an EBUSY/EPERM problem for the loser while
the winner is holding a handle to the target files.  (The existing
packfile code already handled simple the existence and/or replacement
case.)

The solution presented here is to silently let the loser claim
victory IIF the .pack and .idx are already present in the ODB.
(We can't check this in advance because we don't know the packfile
SHA checksum until after we receive it and run index-pack.)

We avoid using a per-packfile lockfile (or a single lockfile for
the `vfs-` prefix) to avoid the usual issues with stale lockfiles.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
gvfs-helper prints a "loose <oid>" or "packfile <name>" messages after
they are received to help invokers update their in-memory caches.
Move the code to accumulate these messages in the result_list into
the install_* functions rather than waiting until the end.

POST requests containing 1 object may return a loose object or a packfile
depending on whether the object is a commit or non-commit.  Delaying the
message generation just complicated the caller.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Add data for the number of files created/overwritten and deleted during the checkout.

Give proper category name to all events in unpack-trees.c and eliminate "exp".

This is modified slightly from the original version due to interactions with 26f924d
(unpack-trees: exit check_updates() early if updates are not wanted, 2020-01-07).

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
When using the GVFS protocol, we should _never_ call "git fetch-pack"
to attempt downloading a pack-file via the regular Git protocol. It
appears that the mechanism that prevented this in the VFS for Git
world is due to the read-object hook populating the commits at the
new ref tips in a different way than the gvfs-helper does.

By acting as if the fetch-pack succeeds here in remote-curl, we
prevent a failed fetch.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Earlier versions of the test always returned a packfile in response to a POST.
Now we look at the number of objects in the POST request.

If > 1, always send a packfile.

If = 1 and it is a commit, send a packfile.
Otherwise, send a loose object.

This is to better model the behavior of the GVFS server/protocol which
treats commits differently.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Update tracing around report_tracking() to use 'tracking' category
rather than 'exp' category.

Add ahead/behind results from stat_tracking_info().

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Includes gvfs-specific commits from these pull requests:

	#158
	#159
	#160
	#164

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
When we create temp files for downloading packs, we use a name
based on the current timestamp. There is no randomness in the
name, so we can have collisions in the same second.

Retry the temp pack names using a new "-<retry>" suffix to the
name before the ".temp".

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Includes commits from these pull requests:

	#191
	#205
	#206
	#207
	#208
	#215
	#220
	#221

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Includes these pull requests:

 #227
 #228
 #229
 #231
 #240

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Test t5516-fetch-push.sh has a test 'deny fetch unreachable SHA1,
allowtipsha1inwant=true' that checks stderr for a specific error
string from the remote. In some build environments the error sent
over the remote connection gets mingled with the error from the
die() statement. Since both signals are being output to the same
file descriptor (but from parent and child processes), the output
we are matching with grep gets split.

To reduce the risk of this failure, follow this process instead:

1. Write an error message to stderr.
2. Write an error message across the connection.
3. exit(1).

This reorders the events so the error is written entirely before
the client receives a message from the remote, removing the race
condition.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Fix NTLM support in gvfs-helper.

NTLM is handled magically by libcurl when we CURLAUTH_ANY is enabled AND
we passed empty username/password. This lets it negotiate with the server and
choose the best authentication scheme.
Includes commits from these pull requests:

	#188

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

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

I looked at the range-diff relative to the -rc2 version, and it looks trivially okay ;-)

@derrickstolee derrickstolee changed the title [DO NOT MERGE] Update Git to v2.27.0 (-rc2) [DO NOT MERGE] Update Git to v2.27.0 Jun 1, 2020
@derrickstolee derrickstolee merged commit 26f52f4 into vfs-2.27.0 Jun 1, 2020
@dscho dscho deleted the tentative/vfs-2.27.0 branch June 1, 2020 21:21
@dscho dscho changed the title [DO NOT MERGE] Update Git to v2.27.0 Update Git to v2.27.0 Jun 1, 2020
derrickstolee added a commit to microsoft/scalar that referenced this pull request Jun 2, 2020
See microsoft/git#271.

Updates necessary here:

* The `multi-pack-index` builtin started honoring `repack.packKeptObjects`, which is `false` by default. We want to repack the `.keep` pack because that is just the most-recent prefetch pack-file. We don't expire it, but we want to repack it.

* Upstream now has the `log.excludeDecoration` config option. This allows us to hide the `refs/scalar/hidden/*` refs from the history views, de-cluttering the history for our Scalar enlistments.
derrickstolee added a commit to microsoft/VFSForGit that referenced this pull request Jun 2, 2020
See microsoft/git#271.

Updates necessary here:

* The `multi-pack-index` builtin started honoring `repack.packKeptObjects`, which is `false` by default. We want to repack the `.keep` pack because that is just the most-recent prefetch pack-file. We don't expire it, but we want to repack it.

* The `sparse-checkout` code changed some error messages and behavior, so the `reset --mixed` tests no longer reflect an exact behavior match to vanilla Git (without sparse-checkout). Since VFS for Git dynamically sparsifies, we can't exactly match the behavior in the control repo.
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.

None yet

8 participants