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. #523

Closed

Conversation

rishabhBudhouliya
Copy link
Contributor

JENKINS-47609

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

This PR includes the changes in CloneCommand, CliGitAPIImpl and JGitAPIImpl to implement a new clone behavior which enables "core.longpaths".

@MarkEWaite MarkEWaite added the enhancement Improvement or new feature label Mar 20, 2020
@MarkEWaite
Copy link
Contributor

You'll need to resolve the conflicts or rebase the changes on the tip of the upstream master branch.

@MarkEWaite
Copy link
Contributor

You may want to consider installing the hub command in your local development environment. It simplifies interactions with GitHub. You update from the upstream repository with a single command:

$ hub sync

You create a new pull request with a single command:

$ hub pull-request

You evaluate someone else's pull request with a single command:

$ hub pr checkout 523

@rishabhBudhouliya
Copy link
Contributor Author

rishabhBudhouliya commented Mar 20, 2020

I was actually trying to solve this with hub, I think I've done something wrong.

I've resolved the merge conflicts, 72bb31e

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

A few relatively minor things for you to consider.

@rishabhBudhouliya
Copy link
Contributor Author

@MarkEWaite thanks for the review, I have updated the PR with the relevant changes (I'll try to make the code cleaner and semantically better next time).

@rishabhBudhouliya
Copy link
Contributor Author

The new commit: add3695 address the issue of workspace directory not being able to be renamed to a 260 char file path. (Build was potentially failing because of this issue)

@rishabhBudhouliya
Copy link
Contributor Author

@MarkEWaite I am facing an issue on Windows platform,
java.io.IOException: Cannot run program "git" (in directory "C:\Jenkins\workspace\Plugins_git-client-plugin_PR-523\target\tmp\tehdfmufzlrimdyxmzetepzxegbupzxewqtnlhwiwtcugemiizqsstahyyqufwpdjyolbkegykuhbwdgxmvezycngdpribpzvsiltzsdinfbokkwdnhsmfeeqcioeulxkqeagtjhqzuukqfglubmmcrbjhgifowrlbbxvbgdlqmuzjrngiyoueeunugsrhvcdgtzyvtggbhpocrbzmzithmddknjwbfxbpbiij2887736299497481439"): CreateProcess error=267, The directory name is invalid

This is happening while initializing the workspace for git clone.

@MarkEWaite
Copy link
Contributor

java.io.IOException: Cannot run program "git" (in directory "C:\Jenkins\workspace\Plugins_git-client-plugin_PR-523\target\tmp\tehdfmufzlrimdyxmzetepzxegbupzxewqtnlhwiwtcugemiizqsstahyyqufwpdjyolbkegykuhbwdgxmvezycngdpribpzvsiltzsdinfbokkwdnhsmfeeqcioeulxkqeagtjhqzuukqfglubmmcrbjhgifowrlbbxvbgdlqmuzjrngiyoueeunugsrhvcdgtzyvtggbhpocrbzmzithmddknjwbfxbpbiij2887736299497481439"): CreateProcess error=267, The directory name is invalid

This is happening while initializing the workspace for git clone.

Probably indicates that the directory does not actually exist. Likely the request to create the directory failed because the name of the directory was too long. I believe Windows (and POSIX and Linux and BSD) limit the name of an individual file or directory to 255 characters. At least that is what I observed on my Windows 10 computer. I can create a directory with 255 characters in the name. I can't create a directory with a 256 character name.

You may need to create two directories, one with a 200 character name, then a subdirectory with a name that is more than 60 characters.

@MarkEWaite
Copy link
Contributor

@rishabhBudhouliya thanks again for this pull request. In my CI infrastructure I had a test failing on windows due to not having long paths enabled. I look forward to this extension so that the submodule test in GitClient can use the extension to avoid the problem.

@rishabhBudhouliya
Copy link
Contributor Author

rishabhBudhouliya commented Apr 2, 2020

@MarkEWaite thanks for the suggestions. While I took your advice to create two directories in (200 char + 60 char) format, I am still facing issues.

  • Since I don't have a Windows platform, would it be principally okay for me to commit on this PR and use the Jenkins CI to debug issues?
  • Or should I create my own Windows instance and rather work on that?

…o directory path length>255char"

This is not possible since git init creates the workspace.
This reverts commit 3b1f412.
@rishabhBudhouliya
Copy link
Contributor Author

This time I divided the directory structure, still I receive this issue: java.io.IOException: Cannot run program "git" (in directory "C:\Jenkins\workspace\Plugins_git-client-plugin_PR-523\target\tmp\dumxeaybjajaemmdzlbxgmhubedmkiwcpnbaugxafopmnmxbgudwfthfshdpzqebfqgeunsmndnteonxwdvgjtpugpvsvmxlabjztireqddsfurwsbjkraziyijmcdmlzggns2760806142667394690\gaizndyzlpowncyltbvvipxwdmmkqxrzamanfpgmpdpgbfflimraediaicyhbpvkorobigjgipvgbrpd"): CreateProcess error=267, The directory name is invalid

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.

2 participants