Skip to content
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

Add support for long file paths in CheckoutOptions #2120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DenisKudelin
Copy link

Summary

Adds support for long file paths in CheckoutOptions by introducing the LongPaths property and updating CheckoutStrategy with the GIT_CHECKOUT_LONGPATHS flag.

Changes

  • New property LongPaths in CheckoutOptions.
  • Added GIT_CHECKOUT_LONGPATHS to CheckoutStrategy.

Motivation

Enhances compatibility with projects that have deeply nested directories or long file names, especially on Windows.

@DrewScoggins
Copy link

@bording could you take a look at this PR and help get it merged?

@Ogglas
Copy link

Ogglas commented Oct 6, 2024

@bording We really need this bug fixed. Please prioritize it if possible

@LoopedBard3
Copy link

@Ogglas, I was able to workaround this by setting the longpath option in the global git config. Presuming a global git config already being present on the machine at %USERPROFILE%.gitconfig, we create a temp repo (new Repository(Repository.Init("temprepo"))) and then set the longpath setting in that global config with temp_repo.Config.Set("core.longpaths", true, ConfigurationLevel.Global);. With that set, the clone should use the global setting as long as it is not set at a more local level.

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.

4 participants