jenkinsci / jenkinsci/git-client-plugin

[JENKINS-47609] Add an option for a long path

Open
#1,560 7 comments 0 reactions 0 assignees View on GitHub
component:git-client-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
152
Forks
402
Avg merge
6h 47m
Merged PRs (30d)
4

Description

Git has a limit of 4096 characters for a filename, except on windows when git is compiled with msys. It uses an older version of the windows api and there's a limit of 260 characters for a filename.

As mentioned in the Git Bash wiki, the `core.longpaths` config option tells git to use the UNC file paths (i.e. prepend `\\?\`). This works as long as the base path isn't too long.

Please, add an option to run `git clone` with a `-c core.length true` parameter.

---
Originally reported by alkush21, imported from: Add an option for a long path


  • status: Open
  • priority: Minor
  • component(s): git-client-plugin
  • resolution: Unresolved
  • votes: 2
  • watchers: 6
  • imported: 20251211-071809

Raw content of original issue

Git has a limit of 4096 characters for a filename, except on windows when git is compiled with msys. It uses an older version of the windows api and there's a limit of 260 characters for a filename.
As mentioned in the Git Bash wiki, the `core.longpaths` config option tells git to use the UNC file paths (i.e. prepend `\\?\`). This works as long as the base path isn't too long.

Please, add an option to run `git clone` with a `-c core.length true` parameter.

environment

```
OS: Windows

Jenkins: 2.73.2

Git_client_plugin: 2.5.0

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.