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

[DO NOT MERGE] Rebase to v2.47.1 #710

Merged
merged 242 commits into from
Dec 4, 2024
Merged

Conversation

mjcheetham
Copy link
Member

  1:  766fce69e9 <   -:  ---------- simple-ipc: split async server initialization and running
  2:  51907f8fee <   -:  ---------- fsmonitor: initialize fs event listener before accepting clients
  4:  394eed4843 =   1:  f8a9b7ded7 sparse-index.c: fix use of index hashes in expand_index
  5:  7bcd46a8d6 =   2:  3f29558f50 t5300: confirm failure of git index-pack when non-idx suffix requested
  3:  a3d7a50364 =   3:  39c301e207 t: remove advice from some tests
  6:  f2db492cc6 =   4:  c764d29ec6 t1092: add test for untracked files and directories
  9:  7715abe8da =   5:  45fa069f2f survey: calculate more stats on refs
 11:  01146de194 !   6:  caecb6ce1f survey: show some commits/trees/blobs histograms
    @@ builtin/survey.c: static void print_table_plaintext(struct survey_table *table)
     +
     +	for (int k = 0; k < bin_len; k++) {
     +		struct obj_hist_bin *p = bin + k;
    -+		uint64_t lower_k = lower;
    -+		uint64_t upper_k = upper;
    ++		uintmax_t lower_k = lower;
    ++		uintmax_t upper_k = upper;
     +
     +		lower = upper+1;
     +		upper = (upper << bin_shift) + bin_mask;
    @@ builtin/survey.c: static void print_table_plaintext(struct survey_table *table)
     +			continue;
     +
     +		strbuf_reset(&bucket);
    -+		strbuf_addf(&bucket, "%"PRIu64"..%"PRIu64, lower_k, upper_k);
    ++		strbuf_addf(&bucket, "%"PRIuMAX"..%"PRIuMAX, lower_k, upper_k);
     +
     +		strbuf_reset(&cnt_seen);
    -+		strbuf_addf(&cnt_seen, "%"PRIu64, (uintmax_t)p->cnt_seen);
    ++		strbuf_addf(&cnt_seen, "%"PRIuMAX, (uintmax_t)p->cnt_seen);
     +
     +		strbuf_reset(&sum_size);
    -+		strbuf_addf(&sum_size, "%"PRIu64, (uintmax_t)p->sum_size);
    ++		strbuf_addf(&sum_size, "%"PRIuMAX, (uintmax_t)p->sum_size);
     +
     +		strbuf_reset(&sum_disk_size);
    -+		strbuf_addf(&sum_disk_size, "%"PRIu64, (uintmax_t)p->sum_disk_size);
    ++		strbuf_addf(&sum_disk_size, "%"PRIuMAX, (uintmax_t)p->sum_disk_size);
     +
     +		insert_table_rowv(&table, bucket.buf,
    -+			     cnt_seen.buf, sum_size.buf, sum_disk_size.buf);
    ++			     cnt_seen.buf, sum_size.buf, sum_disk_size.buf, NULL);
     +	}
     +	strbuf_release(&bucket);
     +	strbuf_release(&cnt_seen);
  7:  69b5eb8e25 =   7:  880848c65b index-pack: disable rev-index if index file has non .idx suffix
  8:  fd1e3c24ad =   8:  26be27df82 trace2: prefetch value of GIT_TRACE2_DST_DEBUG at startup
 10:  00f402cea0 <   -:  ---------- amend! survey: add --top=<N> option and config
 12:  56703e74a3 =   9:  afe1b3d4fa survey: add vector of largest objects for various scaling dimensions
 13:  6e58ef526f =  10:  602461174e survey: add pathname of blob or tree to large_item_vec
 14:  d012ace092 =  11:  e0f3278389 survey: add commit-oid to large_item detail
 15:  65e49550c2 !  12:  92dc76f8b5 survey: add commit name-rev lookup to each large_item
    @@ builtin/survey.c: static void survey_phase_objects(struct survey_context *ctx)
      	trace2_region_leave("survey", "phase/objects", ctx->repo);
     -}
     +
    -+
     +	trace2_region_enter("survey", "phase/namerev", the_repository);
     +	do_lookup_name_rev(ctx);
     +	trace2_region_enter("survey", "phase/namerev", the_repository);}
 16:  9d157fdd40 !  13:  b4ef786048 survey: add --no-name-rev option
    @@ builtin/survey.c: static void survey_phase_objects(struct survey_context *ctx)
      	release_revisions(&revs);
      	trace2_region_leave("survey", "phase/objects", ctx->repo);
      
    --
     -	trace2_region_enter("survey", "phase/namerev", the_repository);
     -	do_lookup_name_rev(ctx);
     -	trace2_region_enter("survey", "phase/namerev", the_repository);}
 17:  36931e9e3c =  14:  ff5800d26e survey: started TODO list at bottom of source file
 18:  cbc68151b5 =  15:  53525fc1b9 survey: expanded TODO list at the bottom of the source file
 19:  75357a35a1 =  16:  3c34aa04da survey: expanded TODO with more notes
 20:  590aed4fd5 =  17:  c146336de8 reset --stdin: trim carriage return from the paths
 21:  5e80a3ac4c !  18:  c9463b5e5f Identify microsoft/git via a distinct version suffix
    @@ Commit message
      ## GIT-VERSION-GEN ##
     @@
      GVF=GIT-VERSION-FILE
    - DEF_VER=v2.47.0
    + DEF_VER=v2.47.1
      
     +# Identify microsoft/git via a distinct version suffix
     +DEF_VER=$DEF_VER.vfs.0.0
 22:  a0ff4112b4 =  19:  759993f3df gvfs: ensure that the version is based on a GVFS tag
 23:  6ef654049f =  20:  c9fee9a746 gvfs: add a GVFS-specific header file
 31:  e3d9c14861 =  21:  f026a100ee gvfs: add the core.gvfs config setting
 32:  dd7004d1e2 =  22:  5363b0654c gvfs: add the feature to skip writing the index' SHA-1
 33:  f9b8c1e11a !  23:  0c59b7cd4c gvfs: add the feature that blobs may be missing
    @@ Documentation/config/core.txt: core.gvfs::
     
      ## cache-tree.c ##
     @@
    - 
      #include "git-compat-util.h"
    + #include "gettext.h"
      #include "hex.h"
     +#include "gvfs.h"
      #include "lockfile.h"
 34:  c7ee92640f =  24:  f9c6eaed1d gvfs: prevent files to be deleted outside the sparse checkout
 35:  d25865c8f5 =  25:  43507e2997 gvfs: optionally skip reachability checks/upload pack during fetch
 36:  162137d929 =  26:  04e60c005a gvfs: ensure all filters and EOL conversions are blocked
 37:  2516df27a5 =  27:  69a4394f3c gvfs: allow "virtualizing" objects
 38:  06584ba482 =  28:  4e30600c07 Hydrate missing loose objects in check_and_freshen()
 39:  f3f8f889f5 =  29:  28d07883e6 sha1_file: when writing objects, skip the read_object_hook
 40:  ec080b04e3 =  30:  027100e917 gvfs: add global command pre and post hook procs
 41:  348aec0307 =  31:  8ebfcd21f3 t0400: verify that the hook is called correctly from a subdirectory
 42:  af565b2aed =  32:  7f3c491458 Pass PID of git process to hooks.
 43:  0e0264ed9a =  33:  f108451f77 pre-command: always respect core.hooksPath
 44:  2b67c6a74a !  34:  d5c0cbd865 sparse-checkout: update files with a modify/delete conflict
    @@ merge-recursive.c: static int handle_change_delete(struct merge_options *opt,
      	}
      	free(alt_path);
     
    - ## t/t7615-merge-sparse-checkout.sh (new) ##
    + ## t/t7616-merge-sparse-checkout.sh (new) ##
     @@
     +#!/bin/sh
     +
 45:  3191f6e489 =  35:  d3afb07e8b sparse-checkout: avoid writing entries with the skip-worktree bit
 46:  481bff4974 =  36:  9440e537b4 Do not remove files outside the sparse-checkout
 47:  31d7cc7855 =  37:  bcc1feabd1 send-pack: do not check for sha1 file when GVFS_MISSING_OK set
 48:  d24c5ab140 =  38:  21e7ac3ec4 cache-tree: remove use of strbuf_addf in update_one
 49:  f681e1a681 =  39:  0956fc213a gvfs: block unsupported commands when running in a GVFS repo
 50:  46eca79c7e =  40:  c49f24cd53 worktree: allow in Scalar repositories
 51:  04634cf2ea =  41:  efc8460901 gvfs: allow overriding core.gvfs
 52:  8289b81d14 =  42:  4d87f3a455 BRANCHES.md: Add explanation of branches and using forks
 53:  b8f54a1788 =  43:  0c2b4276d4 Add virtual file system settings and hook proc
 54:  b09c255d30 =  44:  91c84ab8a1 virtualfilesystem: don't run the virtual file system hook if the index has been redirected
 55:  dcb6eeed77 =  45:  b2690cc4cc virtualfilesystem: check if directory is included
 56:  f2621e5ccc =  46:  eed726ae99 backwards-compatibility: support the post-indexchanged hook
 57:  5e58e1f119 =  47:  bf25c76fef gvfs: verify that the built-in FSMonitor is disabled
 58:  ce2abce41c =  48:  295c0df789 wt-status: add trace2 data for sparse-checkout percentage
 59:  7821224ee6 =  49:  7dd7cca71d wt-status: add VFS hydration percentage to normal `git status` output
 60:  326915f7a9 !  50:  15e33c8a3c status: add status serialization mechanism
    @@ wt-status-deserialize.c (new)
     +	const char *line;
     +	const char *arg;
     +
    -+	memset(s, 0, sizeof(*s));
    -+
     +	if ((line = my_packet_read_line(fd, &line_len)) &&
     +	    (skip_prefix(line, "version ", &arg))) {
     +		int version = (int)strtol(arg, NULL, 10);
    @@ wt-status-deserialize.c (new)
     +	}
     +
     +	/*
    ++	 * Copy over some required fields from the current command.
    ++	 */
    ++	des_s->repo = cmd_s->repo;
    ++	des_s->index_file = cmd_s->index_file;
    ++
    ++	/*
     +	 * Deserialize cached status
     +	 */
     +	if (wt_deserialize_parse(cmd_s, des_s, fd) == DESERIALIZE_ERR)
    @@ wt-status-deserialize.c (new)
     +	/*
     +	 * Copy over display-related fields from the current command.
     +	 */
    -+	des_s->repo = cmd_s->repo;
     +	des_s->verbose = cmd_s->verbose;
     +	/* amend */
     +	/* whence */
 61:  315f2e1883 =  51:  32985bce22 Teach ahead-behind and serialized status to play nicely together
 62:  0ff0247948 =  52:  69a2625026 status: serialize to path
 63:  5fe3d3ddd6 =  53:  7dc9425b90 status: reject deserialize in V2 and conflicts
 64:  fe9f2d8233 =  54:  e74c4fa691 serialize-status: serialize global and repo-local exclude file metadata
 65:  377714581f =  55:  cb0713fb04 status: deserialization wait
 66:  2f09a38fe2 =  56:  7b525d9d7f merge-recursive: avoid confusing logic in was_dirty()
 67:  de4dcad3a3 =  57:  02f70595a5 merge-recursive: add some defensive coding to was_dirty()
 68:  eccf80179b =  58:  12aa32d2b3 merge-recursive: teach was_dirty() about the virtualfilesystem
 69:  1e410a610d =  59:  eb337ae898 status: deserialize with -uno does not print correct hint
 70:  a1eee567b9 =  60:  ce7c4baae2 fsmonitor: check CE_FSMONITOR_VALID in ce_uptodate
 71:  b0d651c5b2 =  61:  ef2b8be02f fsmonitor: add script for debugging and update script for tests
 72:  d9b0c4de9d =  62:  a9107c8e27 status: disable deserialize when verbose output requested.
 73:  7ebc9cfe25 =  63:  8f1a58d7b2 t7524: add test for verbose status deserialzation
 74:  894c6fa4dd =  64:  e509c5083c deserialize-status: silently fallback if we cannot read cache file
 75:  1518949888 =  65:  ebe6f19dd3 gvfs:trace2:data: add trace2 tracing around read_object_process
 76:  059147588e =  66:  701b87cd10 gvfs:trace2:data: status deserialization information
 77:  d7543276ac =  67:  c7735387c5 gvfs:trace2:data: status serialization
 78:  b05adb373d =  68:  ce0dd9a06d gvfs:trace2:data: add vfs stats
 79:  9f20d58a46 =  69:  2df249a844 trace2: refactor setting process starting time
 80:  4728e1652d =  70:  3c09592d02 trace2:gvfs:experiment: clear_ce_flags_1
 81:  e5c9e72e26 =  71:  3b76c51dd7 trace2:gvfs:experiment: report_tracking
 82:  310ca5b76c =  72:  cdfaedd21f trace2:gvfs:experiment: read_cache: annotate thread usage in read-cache
 83:  dc05480ae7 =  73:  55e10e0ae2 trace2:gvfs:experiment: read-cache: time read/write of cache-tree extension
 84:  41289c2257 =  74:  4c4bae9b0c trace2:gvfs:experiment: add region to apply_virtualfilesystem()
 85:  a0f0ff0958 =  75:  a1f32969a4 trace2:gvfs:experiment: add region around unpack_trees()
 86:  98907cad07 =  76:  edf9d8a593 trace2:gvfs:experiment: add region to cache_tree_fully_valid()
 87:  a3ae6c2ef5 =  77:  fc351808ce trace2:gvfs:experiment: add unpack_entry() counter to unpack_trees() and report_tracking()
 88:  aeaecb8496 =  78:  5b432948d3 trace2:gvfs:experiment: increase default event depth for unpack-tree data
 89:  bc6777b5a7 =  79:  550270b40d trace2:gvfs:experiment: add data for check_updates() in unpack_trees()
 90:  97677e8cda =  80:  5f2cad3202 Trace2:gvfs:experiment: capture more 'tracking' details
 91:  63867c1efc =  81:  045abab547 credential: set trace2_child_class for credential manager children
 92:  eebba67be8 =  82:  6b0b19ebc4 sub-process: do not borrow cmd pointer from caller
 93:  5c5978f7b3 =  83:  afba63dd33 sub-process: add subprocess_start_argv()
 94:  e29fc35683 =  84:  b43ee7e9ec sha1-file: add function to update existing loose object cache
 95:  3f933ea8fc =  85:  fd35572bd6 packfile: add install_packed_git_and_mru()
 96:  84be3acef2 =  86:  d6eed3fafe index-pack: avoid immediate object fetch while parsing packfile
 97:  c01af59c9f =  87:  b5911161e4 gvfs-helper: create tool to fetch objects using the GVFS Protocol
 98:  18880aedfb =  88:  9e3533154a sha1-file: create shared-cache directory if it doesn't exist
 99:  97241c5352 =  89:  5c03db57e1 gvfs-helper: better handling of network errors
100:  767101453c =  90:  1a87dad4ee gvfs-helper-client: properly update loose cache with fetched OID
101:  498965dd01 =  91:  6a6ac0ab59 gvfs-helper: V2 robust retry and throttling
102:  c26c30ca9c =  92:  27bb4f328d gvfs-helper: expose gvfs/objects GET and POST semantics
103:  e848049384 =  93:  820a44fb6c gvfs-helper: dramatically reduce progress noise
104:  a0660a86c7 =  94:  48b3f902f7 gvfs-helper-client.h: define struct object_id
105:  7ca6622f2f =  95:  26027b9f54 gvfs-helper: handle pack-file after single POST request
106:  489690cad2 =  96:  7bd258b29a test-gvfs-prococol, t5799: tests for gvfs-helper
107:  fa345912a6 =  97:  f1429978dc gvfs-helper: move result-list construction into install functions
108:  89eee0907c =  98:  6ec53d2c0f t5799: add support for POST to return either a loose object or packfile
109:  79d9ca3e10 =  99:  89cd88532b t5799: cleanup wc-l and grep-c lines
110:  0b1bb6b984 = 100:  90337754cb gvfs-helper: verify loose objects after write
111:  825246de4e = 101:  f67891fb49 t7599: create corrupt blob test
112:  bcf41328fb = 102:  066b25ff96 gvfs-helper: add prefetch support
113:  b09134e91f = 103:  4aee040a4e gvfs-helper: add prefetch .keep file for last packfile
114:  310ecd2977 = 104:  be6e21610d gvfs-helper: do one read in my_copy_fd_len_tail()
115:  d0434d9a17 = 105:  58576a01e0 gvfs-helper: move content-type warning for prefetch packs
116:  fc04f4e4e9 = 106:  9c79566a43 fetch: use gvfs-helper prefetch under config
117:  2f45c5cf2b = 107:  3ad5ca23a8 gvfs-helper: better support for concurrent packfile fetches
118:  74be43646d = 108:  db1f44aea2 remote-curl: do not call fetch-pack when using gvfs-helper
119:  1bd9618f76 = 109:  f0e01d857c fetch: reprepare packs before checking connectivity
120:  ab1bf56b24 = 110:  e1797f86ee gvfs-helper: retry when creating temp files
121:  7c508fdd9c = 111:  47ae2c04df sparse: avoid warnings about known cURL issues in gvfs-helper.c
122:  3c21eb8206 = 112:  b7d9e595f8 gvfs-helper: add --max-retries to prefetch verb
123:  d926ead804 = 113:  cd615fc3b9 t5799: add tests to detect corrupt pack/idx files in prefetch
124:  7187cdc550 = 114:  eae3e037f3 gvfs-helper: ignore .idx files in prefetch multi-part responses
125:  c8e85f07b1 = 115:  d1d2404466 t5799: explicitly test gvfs-helper --fallback and --no-fallback
126:  f33f9164bd = 116:  560038e406 gvfs-helper: don't fallback with new config
127:  b277bb52b7 = 117:  48e648ea8e test-gvfs-protocol: add cache_http_503 to mayhem
128:  d2a392bfd7 = 118:  aed4b59383 maintenance: care about gvfs.sharedCache config
129:  fdbe46e892 = 119:  08a2ba3ca1 t5799: add unit tests for new `gvfs.fallback` config setting
130:  d4809ce58a = 120:  dce178a2bc unpack-trees:virtualfilesystem: Improve efficiency of clear_ce_flags
131:  c5baf20a1e ! 121:  6df4ecf39d homebrew: add GitHub workflow to release Cask
    @@ .github/workflows/release-homebrew.yml (new)
     +  release:
     +    types: [released]
     +
    ++permissions:
    ++  id-token: write # required for Azure login via OIDC
    ++
     +jobs:
     +  release:
     +    runs-on: ubuntu-latest
    @@ .github/workflows/release-homebrew.yml (new)
     +        asset: /git-(.*)\.pkg/
     +        hash: sha256
     +        token: ${{ secrets.GITHUB_TOKEN }}
    ++    - name: Log into Azure
    ++      uses: azure/login@v2
    ++      with:
    ++        client-id: ${{ secrets.AZURE_CLIENT_ID }}
    ++        tenant-id: ${{ secrets.AZURE_TENANT_ID }}
    ++        subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
    ++    - name: Retrieve token
    ++      id: token
    ++      run: |
    ++        az keyvault secret show \
    ++          --name ${{ secrets.HOMEBREW_TOKEN_SECRET_NAME }} \
    ++          --vault-name ${{ secrets.AZURE_VAULT }} \
    ++          --query "value" -o tsv >token &&
    ++        # avoid outputting the token under `set -x` by using `sed` instead of `echo`
    ++        sed s/^/::add-mask::/ <token &&
    ++        sed s/^/result=/ <token >>$GITHUB_OUTPUT &&
    ++        rm token
     +    - name: Update scalar Cask
    -+      uses: mjcheetham/update-homebrew@v1.3
    ++      uses: mjcheetham/update-homebrew@v1.4
     +      with:
    -+        token: ${{ secrets.HOMEBREW_TOKEN }}
    ++        token: ${{ steps.token.outputs.result }}
     +        tap: microsoft/git
     +        name: microsoft-git
     +        type: cask
132:  bb18f1540a = 122:  fa41711bb8 Adding winget workflows
133:  f18e4e939b = 123:  471073ecf2 Disable the `monitor-components` workflow in msft-git
134:  d4f8fd73f3 = 124:  b78d7f54b6 .github: enable windows builds on microsoft fork
135:  e431fc0c35 = 125:  afd87017c5 release: create initial Windows installer build workflow
136:  a328f56f69 = 126:  f7c6f59480 help: special-case HOST_CPU `universal`
137:  c4755a1204 = 127:  3b744e9b1b release: add Mac OSX installer build
138:  a06b3afbdb = 128:  e5d09aa575 release: build unsigned Ubuntu .deb package
139:  1b62d305ed ! 129:  59e8eaf075 release: add signing step for .deb package
    @@ .github/workflows/build-git-installers.yml: jobs:
                mv "$PKGNAME.deb" "$GITHUB_WORKSPACE"
      
     +      - name: Log into Azure
    -+        uses: azure/login@v1
    ++        uses: azure/login@v2
     +        with:
     +          client-id: ${{ secrets.AZURE_CLIENT_ID }}
     +          tenant-id: ${{ secrets.AZURE_TENANT_ID }}
140:  22d8700e80 ! 130:  799f8c16fb release: create draft GitHub release with packages & installers
    @@ .github/workflows/build-git-installers.yml: jobs:
     +        with:
     +          name: linux-artifacts
     +          path: deb-package
    ++
     +      - uses: actions/github-script@v6
     +        with:
     +          script: |
141:  a53c6429df ! 131:  7a8a309be4 build-git-installers: publish gpg public key
    @@ .github/workflows/build-git-installers.yml: jobs:
            success() ||
              (needs.create-linux-artifacts.result == 'skipped' &&
     @@ .github/workflows/build-git-installers.yml: jobs:
    -         with:
                name: linux-artifacts
                path: deb-package
    -+
    + 
     +      - name: Log into Azure
    -+        uses: azure/login@v1
    ++        uses: azure/login@v2
     +        with:
     +          client-id: ${{ secrets.AZURE_CLIENT_ID }}
     +          tenant-id: ${{ secrets.AZURE_TENANT_ID }}
142:  824cd31474 = 132:  ca60df2aa7 release: continue pestering until user upgrades
143:  527d7929b6 = 133:  af7f735d75 Makefile: allow specifying GIT_BUILT_FROM_COMMIT
144:  e837cb1b4e = 134:  7bb260f9a4 dist: archive HEAD instead of HEAD^{tree}
145:  a7a9fccc0c = 135:  b514a26973 release: include GIT_BUILT_FROM_COMMIT in MacOS build
147:  b417e25f00 = 136:  521148df01 release: add installer validation
146:  35b06f4fcc = 137:  3f13abc2d3 update-microsoft-git: create barebones builtin
148:  9124c6d9e4 = 138:  3f702db336 update-microsoft-git: Windows implementation
149:  ba18ed88c7 = 139:  03dd0747f7 update-microsoft-git: use brew on macOS
150:  3a503aa600 = 140:  1b5f1e0e72 .github: update ISSUE_TEMPLATE.md for microsoft/git
151:  a95050df0a = 141:  7f5f680cb9 .github: update PULL_REQUEST_TEMPLATE.md
152:  58aeae275e = 142:  970419c605 Adjust README.md for microsoft/git
 24:  030b553b91 = 143:  8d3fe0f469 git_config_set_multivar_in_file_gently(): add a lock timeout
 25:  b73befa638 ! 144:  aaea46fbab scalar: set the config write-lock timeout to 150ms
    @@ scalar.c
     @@ scalar.c: static int set_recommended_config(int reconfigure)
      		{ "core.safeCRLF", "false" },
      		{ "fetch.showForcedUpdates", "false" },
    - 		{ "push.usePathWalk", "true" },
    + 		{ "pack.usePathWalk", "true" },
     +		{ "core.configWriteLockTimeoutMS", "150" },
      		{ NULL, NULL },
      	};
 26:  d08111155a = 145:  02b908bbe9 scalar: add docs from microsoft/scalar
 27:  7b212db5d3 = 146:  5c9aac406f scalar (Windows): use forward slashes as directory separators
 28:  8521b1ad58 = 147:  41359e0f2c scalar: add retry logic to run_git()
 29:  d97b7b28a4 = 148:  17d44faef0 scalar: support the `config` command for backwards compatibility
153:  9c6101e4dc = 149:  51463f12af scalar: implement a minimal JSON parser
154:  eac9b6465c = 150:  e7d5631ae9 scalar clone: support GVFS-enabled remote repositories
155:  f14c7d8f8d = 151:  879d88c0ca test-gvfs-protocol: also serve smart protocol
156:  c7f3e70bdc = 152:  c3c75c6224 gvfs-helper: add the `endpoint` command
157:  c5f64c9018 = 153:  4b5708142f dir_inside_of(): handle directory separators correctly
158:  753c4cc43f = 154:  ff012a62e5 scalar: disable authentication in unattended mode
159:  a19292ddb5 = 155:  d6ef324029 scalar: do initialize `gvfs.sharedCache`
160:  67c83f5b6b = 156:  4df3f9ad61 scalar diagnose: include shared cache info
161:  20265b8b61 = 157:  9729c3b666 scalar: only try GVFS protocol on https:// URLs
162:  b189c53924 = 158:  7158e018bd scalar: verify that we can use a GVFS-enabled repository
163:  d9857f437d = 159:  2000e589bc scalar: add the `cache-server` command
164:  ef291fc7ae = 160:  28e175fe49 scalar: add a test toggle to skip accessing the vsts/info endpoint
165:  9fe3bbd4c4 = 161:  8458698a81 scalar: adjust documentation to the microsoft/git fork
166:  837148a306 = 162:  519e4f1a59 scalar: enable untracked cache unconditionally
167:  434b5831fa = 163:  bbfb4ca454 scalar: parse `clone --no-fetch-commits-and-trees` for backwards compatibility
168:  47281def88 = 164:  12a32cdd51 scalar: make GVFS Protocol a forced choice
169:  8ee6ef5b0d = 165:  7f41222e95 scalar diagnose: accommodate Scalar's Functional Tests
170:  2769884118 ! 166:  81ca0988c8 ci: run Scalar's Functional Tests
    @@ .github/workflows/scalar-functional-tests.yml (new)
     +
     +    steps:
     +      - name: Check out Git's source code
    -+        uses: actions/checkout@v3
    ++        uses: actions/checkout@v4
     +
     +      - name: Setup build tools on Windows
     +        if: runner.os == 'Windows'
    @@ .github/workflows/scalar-functional-tests.yml (new)
     +          case "$(scalar version 2>&1)" in *.vfs.*) echo Good;; *) exit 1;; esac
     +
     +      - name: Check out Scalar's source code
    -+        uses: actions/checkout@v3
    ++        uses: actions/checkout@v4
     +        with:
     +          fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works.
     +          path: scalar
    @@ .github/workflows/scalar-functional-tests.yml (new)
     +          ref: ${{ env.SCALAR_REF }}
     +
     +      - name: Setup .NET Core
    -+        uses: actions/setup-dotnet@v3
    ++        uses: actions/setup-dotnet@v4
     +        with:
     +          dotnet-version: '3.1.x'
     +
171:  0d0fe292e8 = 167:  ee37a11bbe scalar: upgrade to newest FSMonitor config setting
172:  053aae863e = 168:  2228c5d435 abspath: make strip_last_path_component() global
173:  5c9af56d34 = 169:  9137831963 scalar: configure maintenance during 'reconfigure'
174:  7b65af4c1e = 170:  00db4c4632 scalar: .scalarCache should live above enlistment
175:  a30259c5fe = 171:  173e358527 add/rm: allow adding sparse entries when virtual
176:  7bab9eebb3 = 172:  aa48677fc5 sparse-checkout: add config to disable deleting dirs
177:  cb1e3547b3 = 173:  a579f1e1c3 diff: ignore sparse paths in diffstat
178:  137bd5e8ee = 174:  8e80d9a60d repo-settings: enable sparse index by default
179:  679341858e = 175:  874de28131 diff(sparse-index): verify with partially-sparse
180:  8f74178486 = 176:  e85d52d72b stash: expand testing for `git stash -u`
 30:  a9de9d085a = 177:  27c9054134 sequencer: avoid progress when stderr is redirected
181:  362625bae1 = 178:  20df0a9a32 sparse: add vfs-specific precautions
182:  44b0cdb1fc = 179:  834dec700f reset: fix mixed reset when using virtual filesystem
183:  3dc443cf24 <   -:  ---------- fixup! sparse-checkout: update files with a modify/delete conflict
184:  dd8425303b <   -:  ---------- fixup! survey: show some commits/trees/blobs histograms
185:  7473add5f0 <   -:  ---------- fixup! survey: show some commits/trees/blobs histograms
186:  91bb76cc7a <   -:  ---------- fixup! status: add status serialization mechanism
187:  cc10eb0f64 <   -:  ---------- fixup! survey: add commit name-rev lookup to each large_item
188:  10b13c6650 <   -:  ---------- fixup! survey: add commit name-rev lookup to each large_item
189:  e9974ed088 = 180:  d856bd5cc0 sparse-index: add ensure_full_index_with_reason()
190:  457a14075e = 181:  6be537def4 treewide: add reasons for expanding index
191:  d35ad11a86 = 182:  5872e4d908 treewide: custom reasons for expanding index
192:  f2ebd861cb = 183:  fd4b6100ba sparse-index: add macro for unaudited expansions
193:  6d2316e620 = 184:  46e051cc0e Docs: update sparse index plan with logging
194:  8025aa2754 = 185:  4736f841b5 sparse-index: log failure to clear skip-worktree
195:  a934bbeb94 = 186:  b4b777949b stash: use -f in checkout-index child process
196:  777ce4d2ce = 187:  dcd9c62771 sparse-index: do not copy hashtables during expansion
197:  134a50d936 <   -:  ---------- path-walk: improve path-walk speed with many tags
198:  fb280a9233 <   -:  ---------- fixup! scalar: enable path-walk during push via config
199:  17ce490c3e = 188:  1c3598cc55 t5616: mark tests as bogus with --path-walk
200:  1af435e33b = 189:  fa969cae2a path-walk: add new 'edge_aggressive' option
201:  24c5b3a396 = 190:  701268722f pack-objects: allow --shallow and --path-walk
202:  cec2f4aa8f = 191:  46bb3c9bfb t5538: add test to confirm deltas in shallow pushes
203:  f6d195c5f8 ! 192:  a98c3d7eb6 winget: switch to using an Azure KeyVault
    @@ Metadata
     Author: Johannes Schindelin <Johannes.Schindelin@gmx.de>
     
      ## Commit message ##
    -    winget: switch to using an Azure KeyVault
    +    fixup! Adding winget workflows
     
         Instead of storing the Personal Access Token in an environment secret,
         store it in Azure KeyVault instead. This allows for much better auditing
    @@ .github/workflows/release-winget.yml: on:
          environment: release
          steps:
     +      - name: Log into Azure
    -+        uses: azure/login@v1
    ++        uses: azure/login@v2
     +        with:
     +          client-id: ${{ secrets.AZURE_CLIENT_ID }}
     +          tenant-id: ${{ secrets.AZURE_TENANT_ID }}
204:  7cf963fb7e <   -:  ---------- fixup! homebrew: add GitHub workflow to release Cask
205:  9d0bdfc72e <   -:  ---------- amend! winget: switch to using an Azure KeyVault
206:  2797cd5a87 = 193:  4760f28fb1 gitk: check main window visibility before waiting for it to show
207:  fe2fbdadf0 <   -:  ---------- fixup! ci: run Scalar's Functional Tests
208:  62c8d6be26 <   -:  ---------- fixup! release: create draft GitHub release with packages & installers
209:  6b71f686f3 <   -:  ---------- fixup! release: add signing step for .deb package
210:  af8b9e7b8e <   -:  ---------- fixup! build-git-installers: publish gpg public key
211:  e33cfa5717 <   -:  ---------- fixup! homebrew: add GitHub workflow to release Cask
212:  85da6ef952 <   -:  ---------- fixup! winget: switch to using an Azure KeyVault

vdye and others added 30 commits December 3, 2024 14:33
In ac8acb4 (sparse-index: complete partial expansion, 2022-05-23),
'expand_index()' was updated to expand the index to a given pathspec.
However, the 'path_matches_pattern_list()' method used to facilitate this
has the side effect of initializing or updating the index hash variables
('name_hash', 'dir_hash', and 'name_hash_initialized'). This operation is
performed on 'istate', though, not 'full'; as a result, the initialized
hashes are later overwritten when copied from 'full'. To ensure the correct
hashes are in 'istate' after the index expansion, change the arg used in
'path_matches_pattern_list()' from 'istate' to 'full'.

Note that this does not fully solve the problem. If 'istate' does not have
an initialized 'name_hash' when its contents are copied to 'full',
initialized hashes will be copied back into 'istate' but
'name_hash_initialized' will be 0. Therefore, we also need to copy
'full->name_hash_initialized' back to 'istate' after the index expansion is
complete.

Signed-off-by: Victoria Dye <vdye@github.com>
Add test case to demonstrate that `git index-pack -o <idx-path> pack-path`
fails if <idx-path> does not end in ".idx" when `--rev-index` is
enabled.

In e37d0b8 (builtin/index-pack.c: write reverse indexes, 2021-01-25)
we learned to create `.rev` reverse indexes in addition to `.idx` index
files.  The `.rev` file pathname is constructed by replacing the suffix
on the `.idx` file.  The code assumes a hard-coded "idx" suffix.

In a8dd7e0 (config: enable `pack.writeReverseIndex` by default, 2023-04-12)
reverse indexes were enabled by default.

If the `-o <idx-path>` argument is used, the index file may have a
different suffix.  This causes an error when it tries to create the
reverse index pathname.

The test here demonstrates the failure.  (The test forces `--rev-index`
to avoid interaction with `GIT_TEST_NO_WRITE_REV_INDEX` during CI runs.)

Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
These seem to be custom tests to microsoft/git as they break without
these changes, but these changes are not needed upstream.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Add a test verifying that sparse-checkout (with and without sparse index
enabled) treat untracked files & directories correctly when changing sparse
patterns. Specifically, it ensures that 'git sparse-checkout set'

* deletes empty directories outside the sparse cone
* does _not_ delete untracked files outside the sparse cone

Signed-off-by: Victoria Dye <vdye@github.com>
Calculate the number of symrefs, loose vs packed, and the
maximal/accumulated length of local vs remote branches.

Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
With this commit, we gather statistics about the sizes of commits,
trees, and blobs in the repository, and then present them in the form
of "hexbins", i.e. log(16) histograms that show how many objects fall
into the 0..15 bytes range, the 16..255 range, the 256..4095 range, etc.

For commits, we also show the total count grouped by the number of
parents, and for trees we additionally show the total count grouped by
number of entries in the form of "qbins", i.e. log(4) histograms.

Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Teach index-pack to silently omit the reverse index if the
index file does not have the standard ".idx" suffix.

In e37d0b8 (builtin/index-pack.c: write reverse indexes, 2021-01-25)
we learned to create `.rev` reverse indexes in addition to `.idx` index
files.  The `.rev` file pathname is constructed by replacing the suffix
on the `.idx` file.  The code assumes a hard-coded "idx" suffix.

In a8dd7e0 (config: enable `pack.writeReverseIndex` by default, 2023-04-12)
reverse indexes were enabled by default.

If the `-o <idx-path>` argument is used, the index file may have a
different suffix.  This causes an error when it tries to create the
reverse index pathname.

Since we do not know why the user requested a non-standard suffix for
the index, we cannot guess what the proper corresponding suffix should
be for the reverse index.  So we disable it.

The t5300 test has been updated to verify that we no longer error
out and that the .rev file is not created.

TODO We could warn the user that we skipped it (perhaps only if they
TODO explicitly requested `--rev-index` on the command line).
TODO
TODO Ideally, we should add an `--rev-index-path=<path>` argument
TODO or change `--rev-index` to take a pathname.
TODO
TODO I'll leave these questions for a future series.

Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
Prefetch the value of GIT_TRACE2_DST_DEBUG during startup and before
we try to open any Trace2 destination pathnames.

Normally, Trace2 always silently fails if a destination target
cannot be opened so that it doesn't affect the execution of a
Git command.  The command should run normally, but just not
generate any trace data.  This can make it difficult to debug
a telemetry setup, since the user doesn't know why telemetry
isn't being generated.  If the environment variable
GIT_TRACE2_DST_DEBUG is true, the Trace2 startup will print
a warning message with the `errno` to make debugging easier.

However, on Windows, looking up the env variable resets `errno`
so the warning message always ends with `...tracing: No error`
which is not very helpful.

Prefetch the env variable at startup.  This avoids the need
to update each call-site to capture `errno` in the usual
`saved-errno` variable.

Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
Create `struct large_item` and `struct large_item_vec` to capture the
n largest commits, trees, and blobs under various scaling dimensions,
such as size in bytes, number of commit parents, or number of entries
in a tree.

Each of these have a command line option to set them independently.

Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
Include the pathname of each blob or tree in the large_item_vec
to help identify the file or directory associated with the OID
and size information.

This pathname is computed during the path walk, so it reflects the
first observed pathname seen for that OID during the traversal over
all of the refs.  Since the file or directory could have moved
(without being modified), there may be multiple "correct" pathnames
for a particular OID.  Since we do not control the ref traversal
order, we should consider it to be a "suggested pathname" for the OID.

Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
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 <jeffhostetler@github.com>
Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
This backports the `ds/advice-sparse-index-expansion` patches into
`microsoft/git` which _just_ missed the v2.46.0 window.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <johannes.schindelin@gmx.de>
Cherry-pick rev-index fixes from v2.41.0.vfs.0.5 into v2.42.0.*
Prefetch the value of GIT_TRACE2_DST_DEBUG during startup and before we
try to open any Trace2 destination pathnames.

Normally, Trace2 always silently fails if a destination target cannot be
opened so that it doesn't affect the execution of a Git command. The
command should run normally, but just not generate any trace data. This
can make it difficult to debug a telemetry setup, since the user doesn't
know why telemetry isn't being generated. If the environment variable
GIT_TRACE2_DST_DEBUG is true, the Trace2 startup will print a warning
message with the `errno` to make debugging easier.

However, on Windows, looking up the env variable resets `errno` so the
warning message always ends with `...tracing: No error` which is not
very helpful.

Prefetch the env variable at startup. This avoids the need to update
each call-site to capture `errno` in the usual `saved-errno` variable.
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>
…sitories (#667)

This command is inspired by [`git
sizer`](https://github.com/github/git-sizer), having the advantage of
being much closer to the internals of Git.

The intention is to provide a built-in command that can be used to
analyze large repositories for performance and scaling problems, for
growth over time, and to correlate with other measurements (in
particular with Trace2 data collected e.g. via
https://github.com/git-ecosystem/trace2receiver/).
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 <johannes.schindelin@gmx.de>
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 <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>

gvfs: refactor loading the core.gvfs config value

This code change makes sure that the config value for core_gvfs
is always loaded before checking it.

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>

Update for 2023-02-27: This feature was upstreamed as the index.skipHash
config option. This resulted in some changes to the struct and some of
the setup code. In particular, the config reading was moved to
prepare_repo_settings(), so the core.gvfs bit check was moved there,
too.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Kevin Willford <kewillf@microsoft.com>
Prevent the sparse checkout to delete files that were marked with
skip-worktree bit and are not in the sparse-checkout file.

This is because everything with the skip-worktree bit turned on is being
virtualized and will be removed with the change of HEAD.

There was only one failing test when running with these changes that was
checking to make sure the worktree narrows on checkout which was
expected since we would no longer be narrowing the worktree.

Update 2022-04-05: temporarily set 'sparse.expectfilesoutsideofpatterns' in
test (until we start disabling the "remove present-despite-SKIP_WORKTREE"
behavior with 'core.virtualfilesystem' in a later commit).

Signed-off-by: Kevin Willford <kewillf@microsoft.com>
dscho and others added 13 commits December 3, 2024 14:36
I will intend to send this upstream after the 2.47.0 release cycle, but
this should get to our microsoft/git users for maximum impact.

Customers have been struggling with explaining why the sparse index
expansion advice message is showing up. The advice to run 'git clean'
has not always helped folks, and sometimes it is very unclear why we are
running into trouble.

These changes introduce a way to log a reason for the expansion into the
trace2 logs so it can be found by requesting that a user enable tracing.

While testing this, I created the most standard case that happens, which
is to have an existing directory match a sparse directory in the index.
In this case, it showed that two log messages were required. See the
last commit for this new log message. Together, these two places show
this kind of message in the `GIT_TRACE2_PERF` output (trimmed for
clarity):

```
region_enter | index        | label:clear_skip_worktree_from_present_files_sparse
data         | sparse-index | ..skip-worktree sparsedir:<my-sparse-path>/
data         | index        | ..sparse_path_count:362
data         | index        | ..sparse_lstat_count:732
region_leave | index        | label:clear_skip_worktree_from_present_files_sparse
data         | sparse-index | expansion-reason:failed to clear skip-worktree while sparse
```

I added some tests to demonstrate that these logs are recorded, but it
also seems difficult to hit some of these cases.
Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
An internal customer reported a segfault when running `git
sparse-checkout set` with the `index.sparse` config enabled. I was
unable to reproduce it locally, but with their help we debugged into the
failing process and discovered the following stacktrace:

```
#0  0x00007ff6318fb7b0 in rehash (map=0x3dfb00d0440, newsize=1048576) at hashmap.c:125
#1  0x00007ff6318fbc66 in hashmap_add (map=0x3dfb00d0440, entry=0x3dfb5c58bc8) at hashmap.c:247
#2  0x00007ff631937a70 in hash_index_entry (istate=0x3dfb00d0400, ce=0x3dfb5c58bc8) at name-hash.c:122
#3  0x00007ff631938a2f in add_name_hash (istate=0x3dfb00d0400, ce=0x3dfb5c58bc8) at name-hash.c:638
#4  0x00007ff631a064de in set_index_entry (istate=0x3dfb00d0400, nr=8291, ce=0x3dfb5c58bc8) at sparse-index.c:255
#5  0x00007ff631a06692 in add_path_to_index (oid=0x5ff130, base=0x5ff580, path=0x3dfb4b725da "<redacted>", mode=33188, context=0x5ff570)    at sparse-index.c:307
#6  0x00007ff631a3b48c in read_tree_at (r=0x7ff631c026a0 <the_repo>, tree=0x3dfb5b41f60, base=0x5ff580, depth=2, pathspec=0x5ff5a0,    fn=0x7ff631a064e5 <add_path_to_index>, context=0x5ff570) at tree.c:46
#7  0x00007ff631a3b60b in read_tree_at (r=0x7ff631c026a0 <the_repo>, tree=0x3dfb5b41e80, base=0x5ff580, depth=1, pathspec=0x5ff5a0,    fn=0x7ff631a064e5 <add_path_to_index>, context=0x5ff570) at tree.c:80
#8  0x00007ff631a3b60b in read_tree_at (r=0x7ff631c026a0 <the_repo>, tree=0x3dfb5b41ac8, base=0x5ff580, depth=0, pathspec=0x5ff5a0,    fn=0x7ff631a064e5 <add_path_to_index>, context=0x5ff570) at tree.c:80
#9  0x00007ff631a06a95 in expand_index (istate=0x3dfb00d0100, pl=0x0) at sparse-index.c:422
#10 0x00007ff631a06cbd in ensure_full_index (istate=0x3dfb00d0100) at sparse-index.c:456
#11 0x00007ff631990d08 in index_name_stage_pos (istate=0x3dfb00d0100, name=0x3dfb0020080 "algorithm/levenshtein", namelen=21, stage=0,    search_mode=EXPAND_SPARSE) at read-cache.c:556
#12 0x00007ff631990d6c in index_name_pos (istate=0x3dfb00d0100, name=0x3dfb0020080 "algorithm/levenshtein", namelen=21) at read-cache.c:566
#13 0x00007ff63180dbb5 in sanitize_paths (argc=185, argv=0x3dfb0030018, prefix=0x0, skip_checks=0) at builtin/sparse-checkout.c:756
#14 0x00007ff63180de50 in sparse_checkout_set (argc=185, argv=0x3dfb0030018, prefix=0x0) at builtin/sparse-checkout.c:860
#15 0x00007ff63180e6c5 in cmd_sparse_checkout (argc=186, argv=0x3dfb0030018, prefix=0x0) at builtin/sparse-checkout.c:1063
#16 0x00007ff6317234cb in run_builtin (p=0x7ff631ad9b38 <commands+2808>, argc=187, argv=0x3dfb0030018) at git.c:548
#17 0x00007ff6317239c0 in handle_builtin (argc=187, argv=0x3dfb0030018) at git.c:808
#18 0x00007ff631723c7d in run_argv (argcp=0x5ffdd0, argv=0x5ffd78) at git.c:877
#19 0x00007ff6317241d1 in cmd_main (argc=187, argv=0x3dfb0030018) at git.c:1017
#20 0x00007ff631838b60 in main (argc=190, argv=0x3dfb0030000) at common-main.c:64 
```

The very bottom of the stack being the `rehash()` method from
`hashmap.c` as called within the `name-hash` API made me look at where
these hashmaps were being used in the sparse index logic. These were
being copied across indexes, which seems dangerous. Indeed, clearing
these hashmaps and setting them as not initialized fixes the segfault.

The second commit is a response to a test failure that happens in
`t1092-sparse-checkout-compatibility.sh` where `git stash pop` starts to
fail because the underlying `git checkout-index` process fails due to
colliding files. Passing the `-f` flag appears to work, but it's unclear
why this name-hash change causes that change in behavior.
These two tests in t5616-partial-clone.sh are actually already broken
and there are comments supporting that. Those comments were focused on
the GIT_TEST_FULL_NAME_HASH variable, but they also apply to this one.
We will want to avoid issues here.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
In preparation for allowing both the --shallow and --path-walk options
in the 'git pack-objects' builtin, create a new 'edge_aggressive' option
in the path-walk API. This option will help walk the boundary more
thoroughly and help avoid sending extra objects during fetches and
pushes.

The only use of the 'edge_hint_aggressive' option in the revision API is
within mark_edges_uninteresting(), which is usually called before
between prepare_revision_walk() and before visiting commits with
get_revision(). In prepare_revision_walk(), the UNINTERESTING commits
are walked until a boundary is found.

We didn't use this in the past because we would mark objects
UNINTERESTING after doing the initial commit walk to the boundary. While
we should be marking these objects as UNINTERESTING, we shouldn't _emit_
them all via the path-walk algorithm or else our delta calculations will
get really slow.

Based on these observations, the way we were handling the UNINTERESTING
flag in walk_objects_by_path() was overly complicated and buggy. A lot
of it can be removed and simplified to work with this new approach.

It also means that we will see the UNINTERESTING boundaries of paths
when doing a default path-walk call, changing some existing test cases.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
There does not appear to be anything particularly incompatible about the
--shallow and --path-walk options of 'git pack-objects'. If shallow
commits are to be handled differently, then it is by the revision walk
that defines the commit set and which are interesting or uninteresting.

However, before the previous change, a trivial removal of the warning
would cause a failure in t5500-fetch-pack.sh when
GIT_TEST_PACK_PATH_WALK is enabled. The shallow fetch would provide more
objects than we desired, due to some incorrect behavior of the path-walk
API, especially around walking uninteresting objects.

To also cover the symmetrical case of pushing from a shallow clone, add
a new test to t5538-push-shallow.sh that confirms the correct behavior
of pushing only the new object. This works to validate both the
--path-walk and --no-path-walk case when toggling the
GIT_TEST_PACK_PATH_WALK environment variable. This test would have
failed in the --path-walk case if we created it before the previous
change.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
It can be notoriously difficult to detect if delta bases are being
computed properly during 'git push'. Construct an example where it will
make a kilobyte worth of difference when a delta base is not found. We
can then use the progress indicators to distinguish between bytes and
KiB depending on whether the delta base is found and used.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Instead of storing the Personal Access Token in an environment secret,
store it in Azure KeyVault instead. This allows for much better auditing
when (and where) the secret is used.

Ideally, we would even switch away from using a Personal Access Token in
the first place. But there is no alternative, such as a Managed Identity
on GitHub, where one could define in a fine-grained way which usage
scenario can be performed using that identity, and recent reorgs at
GitHub suggest that adding such an alternative may not be on the list of
priorities at all.

So let's just stay with a Personal Access Token, but do safeguard it
better by putting it into a KeyVault that can only be accessed by a
narrowly-scoped GitHub Actions environment.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This pull request aims to correct a pretty big issue when dealing with
UNINTERESTING objects in the path-walk API. They somehow were only
exposed when trying to perform a push from a shallow clone.

This will require rewriting the upstream version so this is avoided from
the start, but we can do a forward fix for now.

The key issue is that the path-walk API was not walking UNINTERESTING
trees at the right time, and the way it was being done was more
complicated than it needed to be. This changes some of the way the
path-walk API works in the presence of UNINTERSTING commits, but these
are good changes to make.

I had briefly attempted to remove the use of the `edge_aggressive`
option in `struct path_walk_info` in favor of using the
`--objects-edge-aggressive` option in the revision struct. When I
started down that road, though, I somehow got myself into a bind of
things not working correctly. I backed out to this version that is
working with our test cases.

I tested this using the thin and big pack tests in `p5313` which had the
same performance as before this change.

The new change is that in a shallow clone we can get the same `git push`
improvements.

I was hung up on testing this for a long time as I wasn't getting the
same results in my shallow clone as in my regular clones. It turns out
that I had forgotten to use `--no-reuse-delta` in my test command, so it
was picking the deltas that were given by the initial clone instead of
picking new ones per the algorithm. 🤦🏻
If the main window is already visible when gitk waits for it to
become visible, gitk hangs forever.
This commit adds a check whether the window is already visible.
See https://wiki.tcl-lang.org/page/tkwait+visibility

Signed-off-by: Tobias Pietzsch <pietzsch@mycroft.speedport.ip>
Instead of storing the Personal Access Token in an environment secret,
store it in Azure KeyVault instead. This allows for much better auditing
when (and where) the secret is used.

Ideally, we would even switch away from using a Personal Access Token in
the first place. But there is no alternative, such as a Managed Identity
on GitHub, where one could define in a fine-grained way which usage
scenario can be performed using that identity, and recent reorgs at
GitHub suggest that adding such an alternative may not be on the list of
priorities at all.

So let's just stay with a Personal Access Token, but do safeguard it
better by putting it into a KeyVault that can only be accessed by a
narrowly-scoped GitHub Actions environment.
If the main window is already visible when gitk waits for it to become
visible, gitk hangs forever.
This commit adds a check whether the window is already visible. See
https://wiki.tcl-lang.org/page/tkwait+visibility

This ports git#944 to `microsoft/git`. for
Git.

Fixed issue #704.
@dscho
Copy link
Member

dscho commented Dec 3, 2024

1: 766fce6 < -: ---------- simple-ipc: split async server initialization and running
2: 51907f8 < -: ---------- fsmonitor: initialize fs event listener before accepting clients

These are actually (OID-)identical to the commits that were merged upstream.

44: 2b67c6a ! 34: d5c0cbd sparse-checkout: update files with a modify/delete conflict
@@ merge-recursive.c: static int handle_change_delete(struct merge_options *opt,
}
free(alt_path);

- ## t/t7615-merge-sparse-checkout.sh (new) ##
+ ## t/t7616-merge-sparse-checkout.sh (new) ##

This is needed because 9c93ba4 introduced t/t7615-diff-algo-with-mergy-operations.sh.

203: f6d195c ! 192: a98c3d7 winget: switch to using an Azure KeyVault
@@ Metadata
Author: Johannes Schindelin Johannes.Schindelin@gmx.de

  ## Commit message ##
-    winget: switch to using an Azure KeyVault
+    fixup! Adding winget workflows

A subsequent rebase should squash this into the intended commit (I had forgotten to mark f6d195c as a fixup! and tried to fix that via 9d0bdfc, which I had created via git commit --fixup reword:...).

Other than that, looks very good!

dscho and others added 3 commits December 3, 2024 22:30
The Git Fundamentals team is no more, and hasn't been for almost a year.
The current owner is the GitClient team (continuity is ensured, though,
by virtue of the same people taking care of `microsoft/git` as before).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The Git Fundamentals team is no more, and hasn't been for almost a year.
The current owner is the GitClient team (continuity is ensured, though,
by virtue of the same people taking care of `microsoft/git` as before).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The Debian package contains a mandatory `Maintainer` entry; Previously,
the Git Fundamentals team was mentioned there.

However, the Git Fundamentals team is no more, and hasn't been for
almost a year. The current owner is the GitClient team (continuity is
ensured, though, by virtue of the same people taking care of
`microsoft/git` as before).

Let's adjust things accordingly.
@mjcheetham mjcheetham merged commit 2dc56ed into vfs-2.47.1 Dec 4, 2024
34 checks passed
@mjcheetham mjcheetham deleted the tentative/vfs-2.47.1 branch December 4, 2024 15:42
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.