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

[JENKINS-47609] Add clone option "core.longpaths" to enable long file names #537

Conversation

rishabhBudhouliya
Copy link
Contributor

JENKINS-47609

Please refer to this PR: jenkinsci/git-plugin#856

Note: This feature doesn't cover all use-cases, it will work properly after this git-for-windows issue is resolved

Windows for git can't work with a directory having a name with greater than 255 characters.
This clone option will add core.longpaths as true in git config globally, which will enable mysys git
to work with directories having >255 char names. The addition is supported by both command line git
and jgit.
@MarkEWaite MarkEWaite added the enhancement Improvement or new feature label May 4, 2020
@@ -1431,6 +1438,12 @@ public void execute() throws GitException, InterruptedException {
repository = builder.build();
repository.create();

if (longPath) {
StoredConfig config = repository.getConfig();
config.setString("core", null,"longpaths","true");

Choose a reason for hiding this comment

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

Not sure if that matters, but linting needs to be taken care of in this line.

@rishabhBudhouliya
Copy link
Contributor Author

rishabhBudhouliya commented Sep 27, 2020

@MarkEWaite Closing this pull request as well. (in reference to PR #856)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants