Skip to content

Rebase to v2.50.0 #763

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

Open
wants to merge 976 commits into
base: vfs-2.50.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
976 commits
Select commit Hold shift + click to select a range
0ac9ed9
reset --stdin: trim carriage return from the paths
Apr 5, 2017
8e3199d
Identify microsoft/git via a distinct version suffix
dscho Apr 23, 2024
b7c43e3
gvfs: ensure that the version is based on a GVFS tag
dscho Apr 4, 2017
21595d0
survey: show some commits/trees/blobs histograms
jeffhostetler Apr 29, 2024
3a29ee7
gvfs: add a GVFS-specific header file
Jan 24, 2017
a08fec1
survey: add vector of largest objects for various scaling dimensions
jeffhostetler May 1, 2024
b6addbb
gvfs: add the core.gvfs config setting
Jan 24, 2017
92d6c1b
survey: add pathname of blob or tree to large_item_vec
jeffhostetler May 15, 2024
b22648e
gvfs: add the feature to skip writing the index' SHA-1
Jan 24, 2017
181c548
survey: add commit-oid to large_item detail
jeffhostetler May 15, 2024
7c9bd46
gvfs: add the feature that blobs may be missing
Jan 24, 2017
6ad0640
survey: add commit name-rev lookup to each large_item
jeffhostetler May 20, 2024
31c9170
gvfs: prevent files to be deleted outside the sparse checkout
May 18, 2016
46a240d
survey: add --no-name-rev option
jeffhostetler Jun 4, 2024
2f03502
gvfs: add global command pre and post hook procs
May 24, 2016
e99fc40
gvfs: optionally skip reachability checks/upload pack during fetch
May 30, 2016
3972ece
survey: started TODO list at bottom of source file
jeffhostetler Jun 17, 2024
e2d4b90
Merge branch 'backport-sparse-index-advice'
dscho Jul 17, 2024
bb22ca0
t0400: verify that the hook is called correctly from a subdirectory
dscho Mar 16, 2017
9e3cb16
gvfs: ensure all filters and EOL conversions are blocked
Jun 15, 2016
3af31c4
survey: expanded TODO list at the bottom of the source file
jeffhostetler Jun 28, 2024
e665179
Fix `sparse-checkout set` crashes (#607)
vdye Sep 20, 2023
f4e18ac
t0400: verify core.hooksPath is respected by pre-command
mjcheetham Mar 12, 2025
0682277
gvfs: allow "virtualizing" objects
Jan 10, 2017
d9b3cb5
survey: expanded TODO with more notes
jeffhostetler Jul 1, 2024
4c85ffd
Fix rev index in 2.42.0 series (#600)
jeffhostetler Aug 29, 2023
91cdb9c
Pass PID of git process to hooks.
alepauly Apr 10, 2017
731f770
Hydrate missing loose objects in check_and_freshen()
Mar 15, 2017
410114d
Merge branch 'jh/experimental-survey'
dscho Jul 1, 2024
18a74e4
trace2: prefetch value of GIT_TRACE2_DST_DEBUG at startup (#663)
dscho Jun 26, 2024
4ded04a
sparse-checkout: make sure to update files with a modify/delete conflict
Feb 22, 2017
20a6871
sha1_file: when writing objects, skip the read_object_hook
dscho Sep 8, 2017
ef98aae
Add the experimental git survey command to analyze (large) local repo…
dscho Jul 2, 2024
243afe7
status: add status serialization mechanism
jeffhostetler Aug 22, 2017
d17cbee
Teach ahead-behind and serialized status to play nicely together
jamill Jan 10, 2018
95c7762
status: serialize to path
jeffhostetler Feb 2, 2018
ee09884
status: reject deserialize in V2 and conflicts
jeffhostetler Feb 7, 2018
8a127d0
sparse-checkout: avoid writing entries with the skip-worktree bit
Mar 1, 2017
5c68d91
serialize-status: serialize global and repo-local exclude file metadata
jeffhostetler Jul 20, 2018
cad0d38
gvfs:trace2:data: add trace2 tracing around read_object_process
jeffhostetler Sep 26, 2018
ace1f7e
Do not remove files outside the sparse-checkout
Apr 5, 2017
89dddeb
Add virtual file system settings and hook proc
benpeart Jan 11, 2018
3b219d7
status: deserialization wait
jeffhostetler Jul 25, 2018
4fb72fa
gvfs:trace2:data: status deserialization information
jeffhostetler Sep 26, 2018
a765693
send-pack: do not check for sha1 file when GVFS_MISSING_OK set
Nov 16, 2018
796b668
virtualfilesystem: don't run the virtual file system hook if the inde…
benpeart Aug 1, 2018
03d7bae
status: deserialize with -uno does not print correct hint
jeffhostetler Jun 25, 2019
158f193
gvfs:trace2:data: status serialization
jeffhostetler Jan 7, 2019
642efee
cache-tree: remove use of strbuf_addf in update_one
Jul 3, 2017
faad088
virtualfilesystem: check if directory is included
Oct 9, 2018
ed3afe5
fsmonitor: check CE_FSMONITOR_VALID in ce_uptodate
kewillford Nov 21, 2019
8a6d3a6
gvfs:trace2:data: add vfs stats
jeffhostetler Nov 19, 2018
cc40088
gvfs: block unsupported commands when running in a GVFS repo
benpeart Dec 6, 2018
db8995e
backwards-compatibility: support the post-indexchanged hook
dscho May 28, 2019
b30360f
fsmonitor: add script for debugging and update script for tests
kewillford Nov 21, 2019
3caf354
trace2: refactor setting process starting time
jeffhostetler Apr 15, 2019
c7928a6
worktree: allow in Scalar repositories
derrickstolee Sep 30, 2022
14c43c9
gvfs: verify that the built-in FSMonitor is disabled
dscho Jun 18, 2021
1203c1f
status: disable deserialize when verbose output requested.
jeffhostetler Apr 11, 2020
d70fd63
trace2:gvfs:experiment: clear_ce_flags_1
jeffhostetler Apr 30, 2019
f2bc261
gvfs: allow overriding core.gvfs
derrickstolee Apr 15, 2020
299e951
wt-status: add trace2 data for sparse-checkout percentage
jeffhostetler Jun 21, 2024
d2e2c19
t7524: add test for verbose status deserialzation
jeffhostetler Apr 11, 2020
0e2c869
trace2:gvfs:experiment: report_tracking
jeffhostetler Apr 30, 2019
02d8514
BRANCHES.md: Add explanation of branches and using forks
Jul 27, 2018
86df488
wt-status: add VFS hydration percentage to normal `git status` output
jeffhostetler Jun 24, 2024
a06fc41
deserialize-status: silently fallback if we cannot read cache file
jeffhostetler May 13, 2020
8b649ed
credential: set trace2_child_class for credential manager children
jeffhostetler Oct 3, 2019
d64b32b
sub-process: do not borrow cmd pointer from caller
jeffhostetler Sep 18, 2019
2cd400a
sub-process: add subprocess_start_argv()
jeffhostetler Sep 18, 2019
72a4a1e
sha1-file: add function to update existing loose object cache
jeffhostetler Sep 24, 2019
24913f1
packfile: add install_packed_git_and_mru()
jeffhostetler Sep 25, 2019
7862c20
index-pack: avoid immediate object fetch while parsing packfile
jeffhostetler Sep 24, 2019
dfa84b1
gvfs-helper: create tool to fetch objects using the GVFS Protocol
jeffhostetler Aug 13, 2019
39d2919
sha1-file: create shared-cache directory if it doesn't exist
jeffhostetler Oct 7, 2019
234de38
gvfs-helper: better handling of network errors
jeffhostetler Oct 8, 2019
2df1986
gvfs-helper-client: properly update loose cache with fetched OID
jeffhostetler Oct 8, 2019
fbae44b
gvfs-helper: V2 robust retry and throttling
jeffhostetler Oct 10, 2019
7953506
gvfs-helper: add prefetch support
jeffhostetler Nov 11, 2019
2eda7e6
trace2:gvfs:experiment: read_cache: annotate thread usage in read-cache
jeffhostetler Jun 14, 2019
dccef60
gvfs-helper: expose gvfs/objects GET and POST semantics
jeffhostetler Oct 21, 2019
8072d6a
gvfs-helper: add prefetch .keep file for last packfile
jeffhostetler Nov 26, 2019
5c2cd7c
trace2:gvfs:experiment: read-cache: time read/write of cache-tree ext…
jeffhostetler Jul 9, 2019
8a6ea92
gvfs-helper: dramatically reduce progress noise
derrickstolee Oct 24, 2019
8c89a27
gvfs-helper: do one read in my_copy_fd_len_tail()
derrickstolee Dec 16, 2019
0ac365f
trace2:gvfs:experiment: add region to apply_virtualfilesystem()
jeffhostetler Jul 16, 2019
8e98c11
gvfs-helper: handle pack-file after single POST request
derrickstolee Nov 11, 2019
7f95692
gvfs-helper: move content-type warning for prefetch packs
derrickstolee Dec 16, 2019
5ff9d32
trace2:gvfs:experiment: add region around unpack_trees()
jeffhostetler Jul 16, 2019
bc9ec98
test-gvfs-prococol, t5799: tests for gvfs-helper
jeffhostetler Oct 25, 2019
4a29c10
fetch: use gvfs-helper prefetch under config
derrickstolee Dec 17, 2019
77eb686
trace2:gvfs:experiment: add region to cache_tree_fully_valid()
jeffhostetler Jul 16, 2019
3a7e0f3
gvfs-helper: move result-list construction into install functions
jeffhostetler Nov 13, 2019
046472a
gvfs-helper: better support for concurrent packfile fetches
jeffhostetler Dec 18, 2019
84ebd4d
trace2:gvfs:experiment: add unpack_entry() counter to unpack_trees() …
jeffhostetler Jul 16, 2019
b4a2b77
t5799: add support for POST to return either a loose object or packfile
jeffhostetler Nov 13, 2019
2d7f2f6
remote-curl: do not call fetch-pack when using gvfs-helper
derrickstolee Feb 3, 2020
43d8148
trace2:gvfs:experiment: increase default event depth for unpack-tree …
jeffhostetler Jul 25, 2019
8d0eb78
t5799: cleanup wc-l and grep-c lines
jeffhostetler Nov 13, 2019
76d5ebf
fetch: reprepare packs before checking connectivity
derrickstolee Mar 12, 2020
83f5cc1
gvfs-helper: add --max-retries to prefetch verb
jeffhostetler Apr 12, 2023
862c7cd
trace2:gvfs:experiment: add data for check_updates() in unpack_trees()
jeffhostetler Jul 25, 2019
123a087
gvfs-helper: verify loose objects after write
derrickstolee Sep 18, 2020
e36ab0c
gvfs-helper: retry when creating temp files
derrickstolee Dec 26, 2019
0dad7c5
t5799: add tests to detect corrupt pack/idx files in prefetch
jeffhostetler Apr 13, 2023
0effeb2
Trace2:gvfs:experiment: capture more 'tracking' details
jeffhostetler Jul 26, 2019
eb34b6c
t7599: create corrupt blob test
jeffhostetler Sep 18, 2020
6a69e21
sparse: avoid warnings about known cURL issues in gvfs-helper.c
derrickstolee Aug 3, 2021
0ef1322
.github/actions/akv-secret: add action to get secrets
mjcheetham Apr 1, 2025
e9b8a43
release: create initial Windows installer build workflow
vdye Jul 16, 2021
17a91b7
release: create initial Windows installer build workflow
mjcheetham Mar 21, 2025
88a4616
help: special-case HOST_CPU `universal`
jeffhostetler Oct 17, 2023
2180612
release: add Mac OSX installer build
vdye Jul 16, 2021
a8adb19
release: build unsigned Ubuntu .deb package
vdye Jul 16, 2021
d9532ce
t5799: explicitly test gvfs-helper --fallback and --no-fallback
jeffhostetler Jun 28, 2024
b0df148
release: add signing step for .deb package
vdye Jul 16, 2021
1a16b20
gvfs-helper: don't fallback with new config
derrickstolee Jun 27, 2024
96e1c99
release: create draft GitHub release with packages & installers
vdye Jul 16, 2021
646d24b
dist: archive HEAD instead of HEAD^{tree}
vdye Dec 2, 2021
5e72bca
update-microsoft-git: create barebones builtin
derrickstolee Apr 29, 2021
2b5995f
.github: reinstate ISSUE_TEMPLATE.md for microsoft/git
derrickstolee Mar 16, 2022
0bb8f8f
git_config_set_multivar_in_file_gently(): add a lock timeout
dscho May 18, 2021
0091209
test-gvfs-protocol: add cache_http_503 to mayhem
jeffhostetler Jun 28, 2024
08cef42
homebrew: add GitHub workflow to release Cask
mjcheetham Jul 24, 2020
ce137e2
Disable the `monitor-components` workflow in msft-git
dscho May 13, 2022
9650baa
build-git-installers: publish gpg public key
ldennington Oct 24, 2023
851e267
release: include GIT_BUILT_FROM_COMMIT in MacOS build
vdye Dec 2, 2021
137a64c
update-microsoft-git: Windows implementation
derrickstolee Apr 29, 2021
62f8bc6
.github: update PULL_REQUEST_TEMPLATE.md
derrickstolee Mar 16, 2022
3485bb3
scalar: set the config write-lock timeout to 150ms
dscho May 18, 2021
9840ecc
scalar: add docs from microsoft/scalar
derrickstolee Jun 16, 2021
9ff3bdb
gvfs-helper: ignore .idx files in prefetch multi-part responses
jeffhostetler Apr 13, 2023
7ab7cde
t5799: add unit tests for new `gvfs.fallback` config setting
jeffhostetler Jun 28, 2024
5d45e7d
maintenance: care about gvfs.sharedCache config
derrickstolee Dec 15, 2020
128e08b
unpack-trees:virtualfilesystem: Improve efficiency of clear_ce_flags
neerajsi-msft2 Feb 6, 2021
2ffb336
Adding winget workflows
Apr 29, 2021
223a8ba
.github: enable windows builds on microsoft fork
derrickstolee Mar 8, 2023
513e6ec
release: continue pestering until user upgrades
derrickstolee Oct 6, 2021
9dd3687
release: add installer validation
ldennington Aug 17, 2022
66f158c
update-microsoft-git: use brew on macOS
derrickstolee Apr 29, 2021
8cf6560
Adjust README.md for microsoft/git
May 4, 2021
6af8d0f
scalar: implement a minimal JSON parser
dscho Apr 26, 2021
2942d9e
scalar clone: support GVFS-enabled remote repositories
dscho Aug 24, 2021
45267f7
test-gvfs-protocol: also serve smart protocol
dscho Apr 16, 2021
ada7a2e
gvfs-helper: add the `endpoint` command
dscho Apr 26, 2021
a879721
dir_inside_of(): handle directory separators correctly
dscho May 14, 2021
f4fa366
scalar: disable authentication in unattended mode
dscho May 6, 2021
68ff7d3
scalar: do initialize `gvfs.sharedCache`
dscho May 3, 2021
2dca24a
scalar diagnose: include shared cache info
dscho Jun 1, 2021
2a84b25
scalar: only try GVFS protocol on https:// URLs
dscho Apr 28, 2021
af5b070
scalar: verify that we can use a GVFS-enabled repository
dscho Apr 16, 2021
09d2236
Merge branch 'scalar-gentler-config-locking'
dscho May 19, 2021
d80494b
scalar: add the `cache-server` command
dscho Apr 23, 2021
12b55ca
Merge branch 'scalar-extra-docs'
dscho Nov 16, 2021
a2db8df
scalar: add a test toggle to skip accessing the vsts/info endpoint
dscho May 12, 2021
87a7479
scalar (Windows): use forward slashes as directory separators
dscho May 10, 2022
a64baf6
scalar: adjust documentation to the microsoft/git fork
dscho Jan 25, 2022
86dbde9
scalar: add retry logic to run_git()
derrickstolee Jun 17, 2021
3b5fa50
scalar: enable untracked cache unconditionally
derrickstolee Jun 21, 2021
b2f4162
scalar: support the `config` command for backwards compatibility
dscho May 27, 2021
7c86b05
Merge branch 'microsoft/vfs-2.35.0'
dscho Oct 7, 2021
b664c83
scalar: parse `clone --no-fetch-commits-and-trees` for backwards comp…
dscho Aug 24, 2021
ee46aac
Merge branch 'scalar'
dscho Aug 24, 2021
638b31b
scalar: make GVFS Protocol a forced choice
derrickstolee May 1, 2024
4239977
sparse-checkout: add config to disable deleting dirs
derrickstolee Aug 22, 2021
11ca338
add/rm: allow adding sparse entries when virtual
derrickstolee Jun 29, 2021
e38cf25
scalar diagnose: accommodate Scalar's Functional Tests
dscho May 9, 2022
d1068bd
scalar: work around GVFS Protocol HTTP/2 failures
Copilot May 22, 2025
d9293a4
diff: ignore sparse paths in diffstat
derrickstolee Jul 26, 2021
2d8d1ec
Merge pull request #392: add: allow adding sparse entries when virtual
derrickstolee Jul 1, 2021
15b2ae8
ci: run Scalar's Functional Tests
dscho Jun 8, 2021
bcd3c4e
Merge branch 'scalar-with-gvfs'
dscho May 3, 2021
43dc9ea
repo-settings: enable sparse index by default
derrickstolee Jun 15, 2021
f2172e0
Merge pull request #410: Sparse Index: latest integrations
derrickstolee Aug 24, 2021
cd079fc
abspath: make strip_last_path_component() global
derrickstolee Oct 4, 2022
424e378
scalar: upgrade to newest FSMonitor config setting
vdye Apr 5, 2022
8640d93
Merge branch 'run-scalar-functional-tests'
dscho Nov 16, 2021
2056527
diff(sparse-index): verify with partially-sparse
ldennington Sep 10, 2021
dda8f4d
Merge pull request #414: Make sparse index the default
derrickstolee Aug 26, 2021
aeca46e
scalar: .scalarCache should live above enlistment
derrickstolee Sep 30, 2022
eb7a155
Merge branch 'scalar-reconfigure'
dscho Jun 1, 2021
6e81488
stash: expand testing for `git stash -u`
vdye Sep 22, 2021
c3914a3
Merge pull request #419 from ldennington/sparse-index-diff
ldennington Sep 12, 2021
21daf79
Merge pull request #536: Allow --no-src during clones and git worktre…
dscho Oct 4, 2022
06d45d2
Merge core VFS features
dscho Jun 11, 2018
fbea14d
Merge advanced VFS-specific features
dscho Jun 11, 2018
629dd82
Merge virtualfilesystem hook
dscho Jun 11, 2018
0343fe9
sparse: add vfs-specific precautions
derrickstolee Oct 31, 2021
5a158dc
sequencer: avoid progress when stderr is redirected
derrickstolee Sep 23, 2021
aaa0899
Merge pull request #430 from vdye/sparse-index/clean
vdye Sep 23, 2021
9b373b2
Merge updates to serialized status
dscho Jun 11, 2018
2e7bbe4
reset: fix mixed reset when using virtual filesystem
Mar 15, 2017
05a3682
Merge pull request #432: sequencer: avoid progress when stderr is red…
derrickstolee Sep 23, 2021
307f037
Merge trace2 experimental regions
jeffhostetler Apr 23, 2019
a6e2d41
Merge pull request #494: reset: fix mixed reset when using virtual fi…
derrickstolee Apr 4, 2022
a1cd891
Merge first wave of gvfs-helper feature
jeffhostetler Nov 14, 2019
b204bc8
Merge gvfs-helper prefetch feature
derrickstolee Dec 17, 2019
6dcee95
Harden gvfs-helper to validate the packfiles in a multipart prefetch …
jeffhostetler Apr 17, 2023
bc12e86
gvfs-helper: add gvfs.fallback and unit tests (#665)
dscho Jul 1, 2024
dae8395
Merge pull request #301: Update 'git maintenance' to match upstream
derrickstolee Dec 15, 2020
fac82cb
Merge pull request #315: unpack-trees:virtualfilesystem: Improve effi…
derrickstolee Feb 16, 2021
3c83783
Merge branch 'add-workflows'
derrickstolee Apr 30, 2021
ed0184b
Merge branch 'adjust-g4w-workflows'
dscho May 13, 2022
1fb0d5c
Merge pull request #399 from vdye/feature/build-installers
vdye Jul 29, 2021
69eac6c
Merge pull request #472 from vdye/ms/macos-build-options
vdye Dec 6, 2021
34cba6f
Merge pull request #329: Add `git update-microsoft-git`
derrickstolee Apr 30, 2021
c972985
Merge pull request #333: update microsoft/git README
derrickstolee May 17, 2021
4571c2d
sparse-index: add ensure_full_index_with_reason()
derrickstolee Sep 30, 2024
c8b29ea
Merge pull request #371 from dscho/run-scalar-functional-tests-and-fi…
dscho Jun 9, 2021
931f6e8
treewide: add reasons for expanding index
derrickstolee Sep 30, 2024
50ad2b3
Merge branch 'sparse-index-stuff'
dscho Jun 17, 2022
846189d
treewide: custom reasons for expanding index
derrickstolee Sep 30, 2024
0ccfb5a
sparse-index: add macro for unaudited expansions
derrickstolee Sep 30, 2024
706a323
Docs: update sparse index plan with logging
derrickstolee Sep 30, 2024
98d1f23
path-walk: add new 'edge_aggressive' option
derrickstolee Oct 22, 2024
23446d3
stash: use -f in checkout-index child process
derrickstolee Sep 30, 2024
6720b36
sparse-index: log failure to clear skip-worktree
derrickstolee Sep 30, 2024
407974b
sub-process: avoid leaking `cmd`
dscho Dec 18, 2024
056cdd5
pack-objects: allow --shallow and --path-walk
derrickstolee Oct 22, 2024
552564f
sparse-index: do not copy hashtables during expansion
derrickstolee Sep 27, 2024
a153650
Sparse Index: log why the index is being expanded (#691)
dscho Oct 9, 2024
86feae8
remote-curl: release filter options before re-setting them
dscho Dec 18, 2024
163de2d
t5538: add test to confirm deltas in shallow pushes
derrickstolee Oct 22, 2024
8f95ff0
Fix rare segfault in sparse-index (#690)
dscho Oct 9, 2024
a46efae
t7900-maintenance.sh: reset config between tests
mjcheetham Jan 22, 2025
538826f
transport: release object filter options
dscho Dec 18, 2024
24c59c6
pack-objects: allow --path-walk with --shallow (#699)
dscho Oct 22, 2024
a5bf552
maintenance: add cache-local-objects maintenance task
mjcheetham Jan 14, 2025
98000d7
push: don't reuse deltas with path walk
derrickstolee Nov 16, 2024
92faa6c
Merge branch 'leak-fixes'
dscho Dec 18, 2024
31569a9
scalar.c: add cache-local-objects task
mjcheetham Jan 23, 2025
04402b3
pack-objects: don't reuse deltas with path walk (#707)
dscho Dec 19, 2024
c4c7307
maintenance: add new `cache-local-objects` maintenance task (#720)
mjcheetham Jan 31, 2025
e9a3a10
git.c: add VFS enabled cmd blocking
mjcheetham Mar 6, 2025
08d40ca
git.c: permit repack cmd in Scalar repos
mjcheetham Mar 6, 2025
34661f9
git.c: permit fsck cmd in Scalar repos
mjcheetham Mar 13, 2025
5fcc608
git.c: permit prune cmd in Scalar repos
mjcheetham Mar 13, 2025
7c96b1e
hooks: add custom post-command hook config
derrickstolee Mar 25, 2025
1704aa8
worktree: remove special case GVFS cmd blocking
mjcheetham Mar 6, 2025
7eab4f3
Docs: fix asciidoc failures from short delimiters
derrickstolee Mar 25, 2025
8fca170
builtin/repack.c: emit warning when shared cache is present
mjcheetham Mar 26, 2025
ba650c4
hooks: make hook logic memory-leak free
derrickstolee Mar 25, 2025
3d3f506
Permit `repack` command in Scalar clones (#732)
mjcheetham Mar 31, 2025
6991013
t5309: create failing test for 'git index-pack'
derrickstolee Apr 23, 2025
1390af2
hooks: add custom post-command hook config (#736)
dscho Apr 7, 2025
6ff804c
gvfs-helper: pass `long` values where expected
dscho Jun 6, 2025
50a171b
Fix REF_DELTA chain bug in 'git index-pack' (#745)
dscho Apr 25, 2025
2c69809
gvfs-helper-client: clean up server process(es)
derrickstolee May 23, 2025
8ba0176
Merge branch 'curl-options-want-long-instead-of-int-msft-git'
dscho Jun 6, 2025
d836430
gvfs-helper-client: clean up server process (#756)
dscho Jun 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
- [ ] I was not able to find an [open](https://github.com/git-for-windows/git/issues?q=is%3Aopen) or [closed](https://github.com/git-for-windows/git/issues?q=is%3Aclosed) issue matching what I'm seeing
- [ ] I was not able to find an [open](https://github.com/microsoft/git/issues?q=is%3Aopen)
or [closed](https://github.com/microsoft/git/issues?q=is%3Aclosed) issue matching
what I'm seeing, including in [the `git-for-windows/git` tracker](https://github.com/git-for-windows/git/issues).

### Setup

- Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
- Which version of `microsoft/git` are you using? Is it 32-bit or 64-bit?

```
$ git --version --build-options

** insert your machine's response here **
```

- Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
Are you using Scalar or VFS for Git?

** insert your answer here **

If VFS for Git, then what version?

```
$ cmd.exe /c ver
$ gvfs version

** insert your machine's response here **
```

- What options did you set as part of the installation? Or did you choose the
defaults?
- Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?

```
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
> type "$env:USERPROFILE\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt
$ cmd.exe /c ver

** insert your machine's response here **
```
Expand Down Expand Up @@ -58,7 +58,11 @@ $ cat /etc/install-options.txt

** insert here **

- If the problem was occurring with a specific repository, can you provide the
URL to that repository to help us with testing?
- If the problem was occurring with a specific repository, can you specify
the repository?

** insert URL here **
* [ ] Public repo: **insert URL here**
* [ ] Windows monorepo
* [ ] Office monorepo
* [ ] Other Microsoft-internal repo: **insert name here**
* [ ] Other internal repo.
28 changes: 8 additions & 20 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
Thanks for taking the time to contribute to Git!

Those seeking to contribute to the Git for Windows fork should see
http://gitforwindows.org/#contribute on how to contribute Windows specific
enhancements.

If your contribution is for the core Git functions and documentation
please be aware that the Git community does not use the github.com issues
or pull request mechanism for their contributions.

Instead, we use the Git mailing list (git@vger.kernel.org) for code and
documentation submissions, code reviews, and bug reports. The
mailing list is plain text only (anything with HTML is sent directly
to the spam folder).

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
this fork:

* [ ] This is an early version of work already under review upstream.
* [ ] This change only applies to interactions with Azure DevOps and the
GVFS Protocol.
* [ ] This change only applies to the virtualization hook and VFS for Git.
54 changes: 54 additions & 0 deletions .github/actions/akv-secret/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Get Azure Key Vault Secrets

description: |
Get secrets from Azure Key Vault and store the results as masked step outputs,
environment variables, or files.

inputs:
vault:
required: true
description: Name of the Azure Key Vault.
secrets:
required: true
description: |
Comma- or newline-separated list of secret names in Azure Key Vault.
The output and encoding of secrets can be specified using this syntax:

SECRET ENCODING> $output:OUTPUT
SECRET ENCODING> $env:ENVAR
SECRET ENCODING> FILE

SECRET Name of the secret in Azure Key Vault.
ENCODING (optional) Encoding of the secret: base64.
OUTPUT Name of a step output variable.
ENVAR Name of an environment variable.
FILE File path (relative or absolute).

If no output format is specified the default is a step output variable
with the same name as the secret. I.e, SECRET > $output:SECRET.

Examples:

Assign output variable named `raw-var` to the raw value of the secret
`raw-secret`:

raw-secret > $output:raw-var

Assign output variable named `decoded-var` to the base64 decoded value
of the secret `encoded-secret`:

encoded-secret base64> $output:decoded-var

Download the secret named `tls-certificate` to the file path
`.certs/tls.cert`:

tls-certificate > .certs/tls.cert

Assign environment variable `ENV_SECRET` to the base64 decoded value of
the secret `encoded-secret`:

encoded-secret base64> $env:ENV_SECRET

runs:
using: node20
main: index.js
195 changes: 195 additions & 0 deletions .github/actions/akv-secret/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
const { spawnSync } = require('child_process');
const fs = require('fs');
const os = require('os');
const path = require('path');
const { isUtf8 } = require("buffer");

// Note that we are not using the `@actions/core` package as it is not available
// without either committing node_modules/ to the repository, or using something
// like ncc to bundle the code.

// See https://github.com/actions/toolkit/blob/%40actions/core%401.1.0/packages/core/src/command.ts#L81-L87
const escapeData = (s) => {
return s
.replace(/%/g, '%25')
.replace(/\r/g, '%0D')
.replace(/\n/g, '%0A')
}

const stringify = (value) => {
if (typeof value === 'string') return value;
if (Buffer.isBuffer(value) && isUtf8(value)) return value.toString('utf-8');
return undefined;
}

const trimEOL = (buf) => {
let l = buf.length
if (l > 0 && buf[l - 1] === 0x0a) {
l -= l > 1 && buf[l - 2] === 0x0d ? 2 : 1
}
return buf.slice(0, l)
}

const writeBufToFile = (buf, file) => {
out = fs.createWriteStream(file)
out.write(buf)
out.end()
}

const logInfo = (message) => {
process.stdout.write(`${message}${os.EOL}`);
}

const setFailed = (error) => {
process.stdout.write(`::error::${escapeData(error.message)}${os.EOL}`);
process.exitCode = 1;
}

const writeCommand = (file, name, value) => {
// Unique delimiter to avoid conflicts with actual values
let delim;
for (let count = 0; ; count++) {
delim = `XXXXXX${count}`;
if (!name.includes(delim) && !value.includes(delim)) {
break;
}
}

fs.appendFileSync(file, `${name}<<${delim}${os.EOL}${value}${os.EOL}${delim}${os.EOL}`);
}

const setSecret = (value) => {
value = stringify(value);

// Masking a secret that is not a valid UTF-8 string or buffer is not useful
if (value === undefined) return;

process.stdout.write(
value
.split(/\r?\n/g)
.filter(line => line.length > 0) // Cannot mask empty lines
.map(
value => `::add-mask::${escapeData(value)}${os.EOL}`
)
.join('')
);
}

const setOutput = (name, value) => {
value = stringify(value);
if (value === undefined) {
throw new Error(`Output value '${name}' is not a valid UTF-8 string or buffer`);
}

writeCommand(process.env.GITHUB_OUTPUT, name, value);
}

const exportVariable = (name, value) => {
value = stringify(value);
if (value === undefined) {
throw new Error(`Environment variable '${name}' is not a valid UTF-8 string or buffer`);
}

writeCommand(process.env.GITHUB_ENV, name, value);
}

(async () => {
const vault = process.env.INPUT_VAULT;
const secrets = process.env.INPUT_SECRETS;
// Parse and normalize secret mappings
const secretMappings = secrets
.split(/[\n,]+/)
.map((entry) => entry.trim())
.filter((entry) => entry)
.map((entry) => {
const [input, encoding, output] = entry.split(/(\S+)?>/).map((part) => part?.trim());
return { input, encoding, output: output || `\$output:${input}` }; // Default output to $output:input if not specified
});

if (secretMappings.length === 0) {
throw new Error('No secrets provided.');
}

// Fetch secrets from Azure Key Vault
for (const { input: secretName, encoding, output } of secretMappings) {
let az = spawnSync('az',
[
'keyvault',
'secret',
'show',
'--vault-name',
vault,
'--name',
secretName,
'--query',
'value',
'--output',
'tsv'
],
{
stdio: ['ignore', 'pipe', 'inherit'],
shell: true // az is a batch script on Windows
}
);

if (az.error) throw new Error(az.error, { cause: az.error });
if (az.status !== 0) throw new Error(`az failed with status ${az.status}`);

// az keyvault secret show --output tsv returns a buffer with trailing \n
// (or \r\n on Windows), so we need to trim it specifically.
let secretBuf = trimEOL(az.stdout);

// Mask the raw secret value in logs
setSecret(secretBuf);

// Handle encoded values if specified
// Sadly we cannot use the `--encoding` parameter of the `az keyvault
// secret (show|download)` command as the former does not support it, and
// the latter must be used with `--file` (we could use /dev/stdout on UNIX
// but not on Windows).
if (encoding) {
switch (encoding.toLowerCase()) {
case 'base64':
secretBuf = Buffer.from(secretBuf.toString('utf-8'), 'base64');
break;
case 'ascii':
case 'utf8':
case 'utf-8':
// No need to decode the existing buffer from the az command
break;
default:
throw new Error(`Unsupported encoding: ${encoding}`);
}

// Mask the decoded value
setSecret(secretBuf);
}

const outputType = output.startsWith('$env:')
? 'env'
: output.startsWith('$output:')
? 'output'
: 'file';

switch (outputType) {
case 'env':
const varName = output.replace('$env:', '').trim();
exportVariable(varName, secretBuf);
logInfo(`Secret set as environment variable: ${varName}`);
break;

case 'output':
const outputName = output.replace('$output:', '').trim();
setOutput(outputName, secretBuf);
logInfo(`Secret set as output variable: ${outputName}`);
break;

case 'file':
const filePath = output.trim();
fs.mkdirSync(path.dirname(filePath), { recursive: true });
writeBufToFile(secretBuf, filePath);
logInfo(`Secret written to file: ${filePath}`);
break;
}
}
})().catch(setFailed);
Loading
Loading