Skip to content

fix(desktop): inject core.longpaths into isolated Windows git config - #6095

Open
santhiprakash wants to merge 1 commit into
block:mainfrom
santhiprakash:fix/desktop-git-core-longpaths
Open

fix(desktop): inject core.longpaths into isolated Windows git config#6095
santhiprakash wants to merge 1 commit into
block:mainfrom
santhiprakash:fix/desktop-git-core-longpaths

Conversation

@santhiprakash

Copy link
Copy Markdown

Summary

Project git subprocesses isolate config with GIT_CONFIG_NOSYSTEM=1 and GIT_CONFIG_GLOBAL=/dev/null. That hides the user's core.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=true into the ephemeral GIT_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 in project_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_auth
    • windows_git_auth_injects_core_longpaths passed
    • non_windows_git_auth_omits_core_longpaths passed
  • Host is Linux; Windows Git-for-Windows behavior is covered by passing is_windows as data into git_auth_config_entries rather than patching cfg!(windows).

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>
@santhiprakash
santhiprakash requested a review from a team as a code owner August 17, 2026 02:10
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.

desktop: Windows Projects repo browser fails for any repo with paths over MAX_PATH — git config is neutralized without core.longpaths

1 participant