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

[Windows] Set core.longpaths option #4915

Closed
wants to merge 3 commits into from

Conversation

al-cheb
Copy link
Contributor

@al-cheb al-cheb commented Jan 20, 2022

Description

https://github.com/git-for-windows/git/blob/main/Documentation/config/core.txt

core.longpaths::
	Enable long path (> 260) support for builtin commands in Git for
	Windows. This is disabled by default, as long paths are not supported
	by Windows Explorer, cmd.exe and the Git for Windows tool chain
	(msys, bash, tcl, perl...). Only enable this if you know what you're
	doing and are prepared to live with a few quirks.

Related issue:

#4913

Check list

  • Related issue / work item is attached
  • Tests are written (if applicable)
  • Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

@al-cheb
Copy link
Contributor Author

al-cheb commented Jan 20, 2022

@dscho, Could you please review ?

miketimofeev
miketimofeev previously approved these changes Jan 20, 2022

if (Test-IsWin16) {
$env:Path += ";$env:ProgramFiles\Git\usr\bin\"
}

# Set core.longpaths option to true in the system-wide [path]/etc/gitconfig file
# https://github.com/git-for-windows/git/blob/main/Documentation/config/core.txt
git config --system core.longpaths true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope that this feature is stable enough to enable as widely as on the build agents... Be prepared to roll back on short notice, it might break users' scenarios in surprising and dramatic ways.

Copy link
Contributor Author

@al-cheb al-cheb Jan 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dscho, Thank you. It's better to be safe.

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.

3 participants