Skip to content

fix(git): force core.longpaths=true on Windows for native git commands - #280

Open
Spelt wants to merge 1 commit into
HashLoad:mainfrom
Spelt:fix/windows-longpaths
Open

Spelt wants to merge 1 commit into
HashLoad:mainfrom
Spelt:fix/windows-longpaths

Conversation

@Spelt

@Spelt Spelt commented Aug 26, 2026

Copy link
Copy Markdown

Checkouts of dependencies with deep paths (e.g. Kastri's Demos/FCMRebooted/NotificationExtension/...) fail with "Filename too long" and "Could not reset index file to revision 'HEAD'" (exit 128) when the user's git config lacks core.longpaths. The embedded go-git client did not have this limitation, so the switch to native git in 3.x surfaced it as a regression.

Prepend -c core.longpaths=true to every native git invocation on Windows so installs work regardless of the user's global git config.

Checkouts of dependencies with deep paths (e.g. Kastri's
Demos/FCMRebooted/NotificationExtension/...) fail with "Filename too
long" and "Could not reset index file to revision 'HEAD'" (exit 128)
when the user's git config lacks core.longpaths. The embedded go-git
client did not have this limitation, so the switch to native git in 3.x
surfaced it as a regression.

Prepend -c core.longpaths=true to every native git invocation on
Windows so installs work regardless of the user's global git config.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@1ea375d). Learn more about missing BASE report.

Files with missing lines Patch % Lines
internal/adapters/secondary/git/git_native.go 0.00% 10 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #280   +/-   ##
=======================================
  Coverage        ?   28.93%           
=======================================
  Files           ?       90           
  Lines           ?     5703           
  Branches        ?        0           
=======================================
  Hits            ?     1650           
  Misses          ?     3910           
  Partials        ?      143           
Flag Coverage Δ
unittests 28.93% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant