fix(desktop): inject core.longpaths into isolated Windows git config - #6095
Open
santhiprakash wants to merge 1 commit into
Open
fix(desktop): inject core.longpaths into isolated Windows git config#6095santhiprakash wants to merge 1 commit into
santhiprakash wants to merge 1 commit into
Conversation
Project git subprocesses set GIT_CONFIG_NOSYSTEM and GIT_CONFIG_GLOBAL=/dev/null, which hides the user's core.longpaths=true. Snapshot clone then dies on any Windows path over MAX_PATH (260) and the Projects panel shows a generic "Repository unavailable". Restore core.longpaths=true in the ephemeral GIT_CONFIG_* entries on Windows only. Fixes block#5989 Signed-off-by: Santhi Prakash <b.santhiprakash@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Project git subprocesses isolate config with
GIT_CONFIG_NOSYSTEM=1andGIT_CONFIG_GLOBAL=/dev/null. That hides the user'score.longpaths=true, so snapshot clone dies on Windows paths over MAX_PATH (260) and the Projects panel shows a generic "Repository unavailable".This injects
core.longpaths=trueinto the ephemeralGIT_CONFIG_*entries on Windows only, restoring the setting the isolation otherwise hides.Related issue
Fixes #5989
Duplicate search: none found. Closest related Windows path issue is #4279 / PR #3707 (
\\?\prefix inproject_git_workflow.rs) — a different bug, not this isolated-config MAX_PATH case.Testing
cargo test --manifest-path desktop/src-tauri/Cargo.toml --lib git_authwindows_git_auth_injects_core_longpathspassednon_windows_git_auth_omits_core_longpathspassedis_windowsas data intogit_auth_config_entriesrather than patchingcfg!(windows).