microsoft / git

A fork of Git containing Microsoft-specific patches.
http://git-scm.com/
Other
761 stars 92 forks source link

Rebase to v2.44.0 #630

Closed vdye closed 6 months ago

vdye commented 6 months ago

Rebase of vfs-2.43.0 onto the latest Git for Windows release (v2.44.0.windows.1). Other than some minor conflicts & header changes, I only had to make one real change (adding a permissions: block to the release creation step of build-git-installers.yml, since GITHUB_TOKEN is now read-only by default).

Successful release build: link

Range diff vs. vfs-2.43.0 ```diff 1: a974b140e7e = 1: 08acea8cbf7 reset --stdin: trim carriage return from the paths 2: ad8d0b9e683 ! 2: a75168a73b0 gvfs: start by adding the -gvfs suffix to the version @@ GIT-VERSION-GEN #!/bin/sh GVF=GIT-VERSION-FILE --DEF_VER=v2.43.0 -+DEF_VER=v2.43.0.vfs.0.0 +-DEF_VER=v2.44.0 ++DEF_VER=v2.44.0.vfs.0.0 LF=' ' 3: fca083a25fd ! 3: 1db481ce86b gvfs: ensure that the version is based on a GVFS tag @@ GIT-VERSION-GEN @@ GIT-VERSION-GEN: if test -f version then VN=$(cat version) || VN="$DEF_VER" - elif test -d ${GIT_DIR:-.git} -o -f .git && + elif { test -d "${GIT_DIR:-.git}" || test -f .git; } && - VN=$(git describe --match "v[0-9]*" HEAD 2>/dev/null) && + VN=$(git describe --match "v[0-9]*vfs*" HEAD 2>/dev/null) && case "$VN" in 4: d78de08d4bd = 4: 7cc11e5cd32 gvfs: add a GVFS-specific header file 5: 3556ea040b1 = 5: 656515f4136 gvfs: add the core.gvfs config setting 6: ccf7f70ff59 = 6: 2ad35f3e596 gvfs: add the feature to skip writing the index' SHA-1 7: 1aa12488ce1 = 7: 69804bb0632 gvfs: add the feature that blobs may be missing 8: e44e823fa28 = 8: 08e1394797f gvfs: prevent files to be deleted outside the sparse checkout 9: f4de9c9245d = 9: 8f948063f65 gvfs: optionally skip reachability checks/upload pack during fetch 10: 4728ebcc650 = 10: 425f60c8ed4 gvfs: ensure all filters and EOL conversions are blocked 11: 9c2a07a19a3 = 11: 180933810bd gvfs: allow "virtualizing" objects 12: 22066333557 = 12: 6829117a64e Hydrate missing loose objects in check_and_freshen() 13: b7c8f6e7c07 = 13: 41d24c3022a sha1_file: when writing objects, skip the read_object_hook 14: 841fbcf104d = 14: c10e77da347 gvfs: add global command pre and post hook procs 15: 7d495f88c08 = 15: 5a78b0cdd62 t0400: verify that the hook is called correctly from a subdirectory 16: d589761797d = 16: bcbcbb1c7e1 Pass PID of git process to hooks. 17: 82294a93745 = 17: 2135705af70 pre-command: always respect core.hooksPath 18: e53d8d9f31b = 18: 8173d74ba67 sparse-checkout: update files with a modify/delete conflict 19: a3c5312fd64 = 19: 5cf57938570 sparse-checkout: avoid writing entries with the skip-worktree bit 20: 31ec87619e6 = 20: 9fea45ae4fe Do not remove files outside the sparse-checkout 21: a147bf0918e ! 21: 203814b133b send-pack: do not check for sha1 file when GVFS_MISSING_OK set @@ Commit message ## send-pack.c ## @@ + #include "date.h" #include "gettext.h" #include "hex.h" - #include "refs.h" +#include "gvfs.h" #include "object-store-ll.h" #include "pkt-line.h" 22: a25fe519c1b = 22: 9f0e5f92d0d cache-tree: remove use of strbuf_addf in update_one 23: 30a0f59f942 ! 23: d724e71925e gvfs: block unsupported commands when running in a GVFS repo @@ git.c: static struct cmd_struct commands[] = { - { "repack", cmd_repack, RUN_SETUP }, + { "repack", cmd_repack, RUN_SETUP | BLOCK_ON_GVFS_REPO }, { "replace", cmd_replace, RUN_SETUP }, + { "replay", cmd_replay, RUN_SETUP }, { "rerere", cmd_rerere, RUN_SETUP }, - { "reset", cmd_reset, RUN_SETUP }, @@ git.c: static struct cmd_struct commands[] = { { "stash", cmd_stash, RUN_SETUP | NEED_WORK_TREE }, { "status", cmd_status, RUN_SETUP | NEED_WORK_TREE }, 24: 094e64e9393 = 24: 40bf6bdc2e6 worktree: allow in Scalar repositories 25: a7dea34e2eb = 25: a202667840a gvfs: allow overriding core.gvfs 26: 543775e1f08 = 26: 12b66632d06 BRANCHES.md: Add explanation of branches and using forks 27: ff2514c3baa = 27: 81dc570c885 Add virtual file system settings and hook proc 28: 23e0749dd79 = 28: 8c1e2c850ef virtualfilesystem: don't run the virtual file system hook if the index has been redirected 29: 4a58f5adfe9 = 29: 456cdb53e24 virtualfilesystem: check if directory is included 30: 9fda9ad8172 = 30: 3e677ad52d6 backwards-compatibility: support the post-indexchanged hook 31: 457e6a4df56 = 31: 9e268843229 gvfs: verify that the built-in FSMonitor is disabled 32: 112fa44e526 = 32: a3f9c230b39 status: add status serialization mechanism 33: e8e29af029b = 33: afa8244ae37 Teach ahead-behind and serialized status to play nicely together 34: 5779892550a = 34: b9a54bf736e status: serialize to path 35: 631b36502aa = 35: 9adbd522e38 status: reject deserialize in V2 and conflicts 36: 69f28807dc0 = 36: 3f92ef4b1f5 serialize-status: serialize global and repo-local exclude file metadata 37: 46da1e99df2 = 37: 3533ff3e2f2 status: deserialization wait 38: dc54eb4dfa6 = 38: 4f0dc9551f0 merge-recursive: avoid confusing logic in was_dirty() 39: 8e008505bff = 39: a6513c48f1a merge-recursive: add some defensive coding to was_dirty() 40: a31e2c58723 ! 40: 62073556915 merge-recursive: teach was_dirty() about the virtualfilesystem @@ merge-recursive.c #include "merge-recursive.h" +#include "virtualfilesystem.h" - #include "advice.h" #include "alloc.h" + #include "cache-tree.h" @@ merge-recursive.c: static int was_dirty(struct merge_options *opt, const char *path) { struct cache_entry *ce; 41: daa14a814c3 = 41: f37bdd5aa94 status: deserialize with -uno does not print correct hint 42: a6bf6f10467 = 42: 25c3e0b4ecb fsmonitor: check CE_FSMONITOR_VALID in ce_uptodate 43: e8099de4c93 = 43: d23c6d3d43a fsmonitor: add script for debugging and update script for tests 44: 10bf9c11a5a = 44: 7788fa91d95 status: disable deserialize when verbose output requested. 45: c48f9a9265c = 45: da3a0631d54 t7524: add test for verbose status deserialzation 46: ca53dad7a4d = 46: bc53d5282db deserialize-status: silently fallback if we cannot read cache file 47: 56c9f6e7457 = 47: cbd50404fbe gvfs:trace2:data: add trace2 tracing around read_object_process 48: c400ad0a0f0 = 48: e77727e7d72 gvfs:trace2:data: status deserialization information 49: 2bd8a8b2a4f = 49: 69bc46aa01d gvfs:trace2:data: status serialization 50: 5f31f1b1c4e = 50: 375bcec8825 gvfs:trace2:data: add vfs stats 51: 2bd6834f19e = 51: 6c017b4a8c1 trace2: refactor setting process starting time 52: d51366d5ab7 = 52: 50541e7274d trace2:gvfs:experiment: clear_ce_flags_1 53: a1f300ea1de = 53: e84e9bbf100 trace2:gvfs:experiment: report_tracking 54: 33229f6bba7 = 54: 7d833880f8b trace2:gvfs:experiment: read_cache: annotate thread usage in read-cache 55: ed99b1b7943 = 55: 2e92c186789 trace2:gvfs:experiment: read-cache: time read/write of cache-tree extension 56: d68452cd696 = 56: f9a546e1a88 trace2:gvfs:experiment: add region to apply_virtualfilesystem() 57: 025fd6a8182 = 57: 8a09e08d230 trace2:gvfs:experiment: add region around unpack_trees() 58: a90ad70eeec = 58: 2424bb01579 trace2:gvfs:experiment: add region to cache_tree_fully_valid() 59: a7682145141 = 59: dfa422ca12c trace2:gvfs:experiment: add unpack_entry() counter to unpack_trees() and report_tracking() 60: 9f23c0fa6d8 = 60: d9fbd93535d trace2:gvfs:experiment: increase default event depth for unpack-tree data 61: af18d6b0051 = 61: ee1ef573aec trace2:gvfs:experiment: add data for check_updates() in unpack_trees() 62: c9403b87c58 = 62: 41c5b125445 Trace2:gvfs:experiment: capture more 'tracking' details 63: 93ed390ecb5 = 63: 49870a50a05 credential: set trace2_child_class for credential manager children 64: f9ff1804283 = 64: f6fca70aa52 sub-process: do not borrow cmd pointer from caller 65: 2224c09d1ff = 65: 327886ffef1 sub-process: add subprocess_start_argv() 66: b6216597571 = 66: 154bddbd1d1 sha1-file: add function to update existing loose object cache 67: c9a3d2862ca = 67: 99bb46ecc11 packfile: add install_packed_git_and_mru() 68: 4fb7e705915 = 68: 1095cd42be6 index-pack: avoid immediate object fetch while parsing packfile 69: ac8e9f9b20d ! 69: 5c54630ff0c gvfs-helper: create tool to fetch objects using the GVFS Protocol @@ Makefile: scalar$X: scalar.o GIT-LDFLAGS $(GITLIBS) ## config.c ## @@ - #include "worktree.h" + #include "wildmatch.h" #include "ws.h" #include "write-or-die.h" +#include "transport.h" @@ gvfs-helper.c (new) +#include "tempfile.h" +#include "oidset.h" +#include "dir.h" ++#include "url.h" +#include "abspath.h" +#include "progress.h" +#include "trace2.h" 70: 0d67b3b5ab5 = 70: f3dc228a1d9 sha1-file: create shared-cache directory if it doesn't exist 71: 412fe9cd273 = 71: 73a6cc3f419 gvfs-helper: better handling of network errors 72: 4512d14cbc3 = 72: ca24fc3908d gvfs-helper-client: properly update loose cache with fetched OID 73: 2f700e605c1 = 73: 0f79deb5c9a gvfs-helper: V2 robust retry and throttling 74: a6e9d9e86c0 = 74: a5e5deec5e7 gvfs-helper: expose gvfs/objects GET and POST semantics 75: 5d60e526f60 = 75: 08fc2eea45d gvfs-helper: dramatically reduce progress noise 76: 49dce2c3743 = 76: c503dd52086 gvfs-helper-client.h: define struct object_id 77: 4a8e7400b5a = 77: 531ffc5d4bf gvfs-helper: handle pack-file after single POST request 78: a037644be53 = 78: ca192b7e289 test-gvfs-prococol, t5799: tests for gvfs-helper 79: cb005dba97f = 79: 1f348460f67 gvfs-helper: move result-list construction into install functions 80: 34c9ff09150 = 80: 1528d924d0f t5799: add support for POST to return either a loose object or packfile 81: b83f2f26dca = 81: 03298f94d16 t5799: cleanup wc-l and grep-c lines 82: a2ffa643a85 = 82: 08188f98a33 gvfs-helper: verify loose objects after write 83: 9e324387f37 = 83: 6a55d771b0d t7599: create corrupt blob test 84: 69a82cee38f = 84: 05c4105e4b2 gvfs-helper: add prefetch support 85: 303a0088c10 = 85: 328ac49d29b gvfs-helper: add prefetch .keep file for last packfile 86: 8168ff201bd = 86: 3bd3ff1ce42 gvfs-helper: do one read in my_copy_fd_len_tail() 87: c03629fd310 = 87: 85b6d4409ab gvfs-helper: move content-type warning for prefetch packs 88: 1538ce2707c = 88: f71d33481b5 fetch: use gvfs-helper prefetch under config 89: ccb306f6880 = 89: f7524212420 gvfs-helper: better support for concurrent packfile fetches 90: a2156c964e7 = 90: 0f68cb63e8b remote-curl: do not call fetch-pack when using gvfs-helper 91: dfb5b012b06 ! 91: d356ff2db87 fetch: reprepare packs before checking connectivity @@ Commit message Signed-off-by: Derrick Stolee ## builtin/fetch.c ## +@@ + #include "transport.h" + #include "gvfs.h" + #include "gvfs-helper-client.h" ++#include "packfile.h" + #include "run-command.h" + #include "parse-options.h" + #include "sigchain.h" @@ builtin/fetch.c: static int store_updated_refs(struct display_state *display_state, opt.exclude_hidden_refs_section = "fetch"; 92: b4526b7a149 = 92: 0dac5bba024 gvfs-helper: retry when creating temp files 93: 91cdad9e947 = 93: 21294264fc2 sparse: avoid warnings about known cURL issues in gvfs-helper.c 94: ff3e440fb09 = 94: 14738b60f81 gvfs-helper: add --max-retries to prefetch verb 95: 99bd372a63f = 95: 1865729d47e t5799: add tests to detect corrupt pack/idx files in prefetch 96: a1076987d14 = 96: 4243dfc84e8 gvfs-helper: ignore .idx files in prefetch multi-part responses 97: 3347e588dad = 97: ac616872e02 maintenance: care about gvfs.sharedCache config 98: a6b2e7ddf5e = 98: 76cd2f05c35 unpack-trees:virtualfilesystem: Improve efficiency of clear_ce_flags 99: 29ffc42a452 = 99: d3cc9520d78 homebrew: add GitHub workflow to release Cask 100: fa5fa71f744 = 100: baa69bfac7b Adding winget workflows 101: f627d1cc9b9 = 101: 144571175cc Disable the `monitor-components` workflow in msft-git 102: e4fb0a66b22 = 102: 0c9f22e9b9e .github: enable windows builds on microsoft fork 103: 2dc2755ab23 = 103: 5a3a699e883 release: create initial Windows installer build workflow 104: c68b447119a = 104: a751ad03a07 help: special-case HOST_CPU `universal` 105: dbbb38b4fe9 = 105: 55fe1c43843 release: add Mac OSX installer build 106: 7fa18cd96c2 = 106: 1015e36c8dd release: build unsigned Ubuntu .deb package 107: 9fa8d8e1787 = 107: 5c21313642b release: add signing step for .deb package 113: a12eb00ec0c = 108: 6ceeebe94d4 update-microsoft-git: create barebones builtin 115: 476e9687262 = 109: 9fa2c36a632 update-microsoft-git: Windows implementation 119: 56ca1c28af5 = 110: eeb8fb8e432 update-microsoft-git: use brew on macOS 121: c81223680b7 = 111: 6f05ba947cd .github: update ISSUE_TEMPLATE.md for microsoft/git 122: f3f3e30981c ! 112: c7a83319cc8 .github: update PULL_REQUEST_TEMPLATE.md @@ .github/PULL_REQUEST_TEMPLATE.md -Nevertheless, you can use GitGitGadget (https://gitgitgadget.github.io/) -to conveniently send your Pull Requests commits to our mailing list. - +-For a single-commit pull request, please *leave the pull request description +-empty*: your commit message itself should describe your changes. +- -Please read the "guidelines for contributing" linked above! +This fork contains changes specific to monorepo scenarios. If you are an +external contributor, then please detail your reason for submitting to 124: 8ee8ea0f362 ! 113: 61747ce6689 Adjust README.md for microsoft/git @@ README.md -string translations (localization l10) should see [po/README.md][] -(a `po` file is a Portable Object file that holds the translations). - --To subscribe to the list, send an email with just "subscribe git" in --the body to majordomo@vger.kernel.org (not the Git list). The mailing +-To subscribe to the list, send an email to +-(see https://subspace.kernel.org/subscribing.html for details). The mailing -list archives are available at , -- and other archival sites. +- and other archival sites. -The core git mailing list is plain text (no HTML!). - -Issues which are security relevant should be disclosed privately to 117: 38fb62411d6 = 114: 68954302010 git_config_set_multivar_in_file_gently(): add a lock timeout 118: 200a0e0f9c4 = 115: 955384e917a scalar: set the config write-lock timeout to 150ms 120: ed3b89a39b2 = 116: 50b32c9ad23 scalar: add docs from microsoft/scalar 123: fd18ac997e2 = 117: 93ca0480da4 scalar (Windows): use forward slashes as directory separators 125: 037027e03bc = 118: ddd637c8966 scalar: add retry logic to run_git() 126: 392824f0e86 = 119: 99041725874 scalar: support the `config` command for backwards compatibility 127: aa6747a780c = 120: 453d4ebbdc4 scalar: implement a minimal JSON parser 128: 7d6c79df512 = 121: a56de780d13 scalar clone: support GVFS-enabled remote repositories 129: 836ea6779e8 = 122: 9cc3bf9bf9b test-gvfs-protocol: also serve smart protocol 130: 7ab1b72dc1a = 123: 107a31f508d gvfs-helper: add the `endpoint` command 131: 2355926e788 = 124: 8708a4b499f dir_inside_of(): handle directory separators correctly 132: 8724aa9597a = 125: bc239e7ba52 scalar: disable authentication in unattended mode 133: 501d792a7a9 = 126: 20105daaeaf scalar: do initialize `gvfs.sharedCache` 134: f70311e5acd = 127: 6ec6b87837d scalar diagnose: include shared cache info 135: 4e919839921 = 128: 80f9ccf677d scalar: only try GVFS protocol on https:// URLs 136: 68220bc892e = 129: 894fd6f9c77 scalar: verify that we can use a GVFS-enabled repository 137: aec7f5e8918 = 130: de5319c6ac5 scalar: add the `cache-server` command 138: e7f533d819c = 131: 7aaefa97134 scalar: add a test toggle to skip accessing the vsts/info endpoint 139: 4f9b0606d7c = 132: 2e09e47efff scalar: adjust documentation to the microsoft/git fork 140: fd68d278238 = 133: 728bf67b847 scalar: enable untracked cache unconditionally 141: ab3184f0f78 = 134: 7386dd1587f scalar: parse `clone --no-fetch-commits-and-trees` for backwards compatibility 142: 1339fd6ffea = 135: 03accb7e741 scalar diagnose: accommodate Scalar's Functional Tests 143: ee54857b00b = 136: e960ac079a6 ci: run Scalar's Functional Tests 144: 34c210a3de9 = 137: 99b9b65ebbd scalar: upgrade to newest FSMonitor config setting 145: 92c86aa4e85 = 138: f80613fbc44 abspath: make strip_last_path_component() global 146: 8cc95bc32ab = 139: e0cbc012f8a scalar: .scalarCache should live above enlistment 147: 146c8517d8b = 140: ab0c7dea38c add/rm: allow adding sparse entries when virtual 148: c147171eb90 = 141: 8577cb1b820 sparse-checkout: add config to disable deleting dirs 149: 4832a77af7e = 142: ee5b0c3fa97 diff: ignore sparse paths in diffstat 150: 7d11cafd7a6 = 143: e4ec64e03a4 repo-settings: enable sparse index by default 151: 7ee263f7b7f = 144: 12f176c914b diff(sparse-index): verify with partially-sparse 152: b5689de6b44 = 145: 914a9938708 stash: expand testing for `git stash -u` 153: b2b0d532322 = 146: 5f9ba58b8fa sequencer: avoid progress when stderr is redirected 154: 9229e503b62 = 147: ffd7346ab3d sparse: add vfs-specific precautions 155: c9ceb957862 = 148: a74960ee1cd reset: fix mixed reset when using virtual filesystem 108: 7563d72a389 ! 149: 3d959687d87 release: create draft GitHub release with packages & installers @@ .github/workflows/build-git-installers.yml: jobs: + + create-github-release: + runs-on: ubuntu-latest -+ needs: [validate-installers] ++ permissions: ++ contents: write ++ needs: ++ - create-linux-artifacts ++ - create-macos-artifacts ++ - windows_artifacts + if: | + success() || + (needs.create-linux-artifacts.result == 'skipped' && 109: 6872758f115 ! 150: 7acf5f5c5a4 build-git-installers: publish gpg public key @@ Commit message ## .github/workflows/build-git-installers.yml ## @@ .github/workflows/build-git-installers.yml: jobs: - create-github-release: - runs-on: ubuntu-latest - needs: [validate-installers] + - create-linux-artifacts + - create-macos-artifacts + - windows_artifacts + env: + AZURE_VAULT: ${{ secrets.AZURE_VAULT }} + GPG_PUBLIC_KEY_SECRET_NAME: ${{ secrets.GPG_PUBLIC_KEY_SECRET_NAME }} 110: d6e810c6458 = 151: 6cd4ad42f68 release: continue pestering until user upgrades 111: 7046a8e8d8a = 152: 0035b9fb363 Makefile: allow specifying GIT_BUILT_FROM_COMMIT 112: aff19d56907 = 153: 7db2e99a330 dist: archive HEAD instead of HEAD^{tree} 114: 03c9452401a = 154: 9e989ee6c05 release: include GIT_BUILT_FROM_COMMIT in MacOS build 116: ab2a0e540c3 ! 155: 23dd028c961 release: add installer validation @@ .github/workflows/build-git-installers.yml: jobs: + create-github-release: runs-on: ubuntu-latest - needs: [validate-installers] + permissions: + contents: write +- needs: +- - create-linux-artifacts +- - create-macos-artifacts +- - windows_artifacts ++ needs: [validate-installers] + env: + AZURE_VAULT: ${{ secrets.AZURE_VAULT }} + GPG_PUBLIC_KEY_SECRET_NAME: ${{ secrets.GPG_PUBLIC_KEY_SECRET_NAME }} 156: 2a05783877b = 156: c8fe603ba93 credential: add new interactive config option 157: 0ae4ac7f664 = 157: a7642ea8ed8 maintenance: add custom config to background jobs 158: 8336d804668 = 158: f1896c9f5e0 scalar: configure maintenance during 'reconfigure' 159: 5cadc4cf231 = 159: 3fba5cb5498 t5300: confirm failure of git index-pack when non-idx suffix requested 160: ae6e1c9f61c = 160: ea013edf31e index-pack: disable rev-index if index file has non .idx suffix 161: b216189f8ea = 161: 57a95987e1f sparse-index.c: fix use of index hashes in expand_index 162: 18c885da65e = 162: 187c9b08573 t1092: add test for untracked files and directories 163: 722968053f0 < -: ----------- trace2: redact passwords from https:// URLs by default 164: e8eec34e7f8 < -: ----------- t0211: test URL redacting in PERF format 165: ff13c046860 < -: ----------- trace2: fix signature of trace2_def_param() macro 166: 8548168d1da < -: ----------- t0212: test URL redacting in EVENT format 167: 52c75ccf0f3 < -: ----------- t0210,t0211: unset SANITIZE_LEAK ```
jeffhostetler commented 6 months ago

Looks fairly straight forward. Thanks!