Skip to content

docs: add Windows longpaths setup instructions to CONTRIBUTING.md - #28926

Closed
Shivang9983 wants to merge 3 commits into
google-gemini:mainfrom
Shivang9983:docs/windows-longpaths-setup
Closed

Shivang9983 wants to merge 3 commits into
google-gemini:mainfrom
Shivang9983:docs/windows-longpaths-setup

Conversation

@Shivang9983

Copy link
Copy Markdown

Summary

Adds Windows core.longpaths=true configuration instructions and recovery steps to CONTRIBUTING.md. On Windows systems, cloning without long paths support fails because deeply nested snapshot file paths exceed the default 260-character MAX_PATH limit, creating ~3,000 dirty staged deletions on a fresh checkout.

Details

  • Documents the git clone -c core.longpaths=true <url> command under the Build process section.
  • Adds Git prerequisite guidance explaining the 260-character MAX_PATH snapshot issue on Windows.
  • Provides explicit recovery commands (git config core.longpaths true && git checkout -- .) for contributors who cloned without the flag.

Related Issues

Related to #28830, #28832

How to Validate

  1. Open CONTRIBUTING.md and review the rendered Markdown under Setting up the development environment and Build process.
  2. Verify formatting and links pass lint checks via npm run format / npm run preflight.
  3. Verify on a Windows host that running git clone -c core.longpaths=true <repo-url> yields a clean working tree (0 dirty/staged files).

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

@Shivang9983
Shivang9983 requested a review from a team as a code owner August 20, 2026 07:59
@google-cla

google-cla Bot commented Aug 20, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions Bot added the size/xs An extra small PR label Aug 20, 2026
@github-actions

github-actions Bot commented Aug 20, 2026 •

Copy link
Copy Markdown

📊 PR Size: size/XS

  • Lines changed: 9
  • Additions: +7
  • Deletions: -2
  • Files changed: 2

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request improves the onboarding experience for Windows contributors by documenting necessary Git configuration steps. By addressing the common issue of deeply nested file paths exceeding the Windows MAX_PATH limit, these changes help ensure that new contributors can successfully clone and maintain a clean working tree.

Highlights

  • Windows Git Configuration: Added instructions to enable core.longpaths=true to prevent checkout failures caused by the 260-character MAX_PATH limit on Windows systems.
  • Documentation Update: Updated the Build process section in CONTRIBUTING.md to include the recommended Git clone command with long paths support enabled.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates CONTRIBUTING.md to document enabling Git long paths support on Windows to prevent checkout failures. The review feedback highlights two main issues: first, markdown link syntax was incorrectly used inside a bash code block, which breaks command execution; second, several helpful commands mentioned in the PR description—specifically the recovery commands for existing clones and the inline clone flag—were omitted from the actual documentation changes. Suggestions are provided to fix the bash code block and include these missing commands.

Note: Security Review has been skipped due to the limited scope of the PR.

Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@gemini-cli gemini-cli Bot added the area/platform Issues related to Build infra, Release mgmt, Testing, Eval infra, Capacity, Quota mgmt label Aug 20, 2026

@Chirag6722 Chirag6722 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed. The substance is right, and git clone -c core.longpaths=true is the correct form rather than a two-step clone-then-configure — --config takes effect after init but before anything is fetched or checked out, so it applies to the very checkout that would otherwise fail, and it persists in the new repo's config afterwards. It also avoids git config --system, which needs an elevated shell and is blocked outright on a lot of managed Windows machines. Good choice.

Two small things.

1. One line will be reflowed by prettier. .prettierrc.json sets printWidth: 80 with proseWrap: "always" for **/*.md, and the third prose line is 99 characters:

 77      - **Windows:** Enable long paths support (`core.longpaths=true`) to avoid
 71        checkout failures from snapshot files exceeding the 260-character
 99        `MAX_PATH` limit. If you have already cloned the repository and are experiencing issues, run:
 59        `git config core.longpaths true && git checkout -- .`

The other three are already within 80, so it is just that one. lint-staged runs prettier --write over *.{json,md}, so npm run format will fix it — the pre-commit hook would have done it automatically if it was installed. Worth noting this will not redden CI: ci.yml's lint job runs eslint, actionlint, shellcheck and yamllint, but no prettier step. So it only shows up later as an unrelated diff for whoever next formats the file. The 101-character git clone line is inside a fenced block and is left alone by prettier, so that one is fine as-is.

2. Consider --global in the recovery command. As written, git config core.longpaths true writes to the local repo, which fixes the checkout in front of you but not the next clone — and someone hitting this once will very likely hit it again on their fork, or on a second worktree. Something like:

git config --global core.longpaths true && git checkout -- .

means they configure it once and stop tripping over it. Local is defensible if the intent is deliberately not to touch a contributor's global config, so treat this as a preference rather than a correction — but if you do keep it local, it may be worth one clause saying so, since the natural reading of a "recovery" command is that it stops the problem recurring.

Worth saying why this doc matters beyond convenience: without core.longpaths, git cannot create the over-length paths, so it leaves them absent from the worktree while the index still lists them. The result is a fresh clone that reports thousands of deletions you did not make, and nothing in that output names MAX_PATH as the cause. That is a failure that misdirects you — you go looking for what you broke, when the checkout simply never completed. git checkout -- . works precisely because the index is intact, which is the detail that makes your recovery command the right one.

@gemini-cli gemini-cli Bot added the priority/p2 Important but can be addressed in a future release. label Aug 20, 2026
@Chirag6722

Copy link
Copy Markdown

Heads up @Shivang9983 — the bot has put #28832 on a seven-day timer. The policy is that PRs are only guaranteed review if the underlying issue carries help wanted, and #28830 has kind/bug, priority/p2 and status/bot-triaged but not that one, so it closes around 31 August unless a maintainer adds it.

Flagging it mainly because your #28926 is in the same position — it is documentation for a problem that has no help wanted issue behind it either, so I would expect the same message there shortly.

I have asked on the PR whether a maintainer can add the label. If you know who to tag, that would probably carry further than me asking cold; you have already done the work that made the case, since running the suite under native PowerShell and CMD is what established this was MSYS rather than Windows.

Either way, thank you for the review and for the core.longpaths PR — that one is still the fix I would point a new Windows contributor at first, because it fails before you ever reach the tests and nothing in the error names the cause.

@Shivang9983

Shivang9983 commented Aug 25, 2026 •

Copy link
Copy Markdown
Author

Hi @google-gemini/gemini-cli-docs
@google-gemini/gemini-cli-maintainers

Could someone please take a look at this PR and approve the workflow runs?

Summary of changes:

  • Adds Windows core.longpaths=true configuration instructions and inline clone flag (git clone -c core.longpaths=true <url>) to prevent checkout failures caused by deep snapshot paths exceeding the 260-character MAX_PATH limit.
  • Provides immediate --global recovery steps for contributors with existing incomplete working trees.
  • Addresses all review feedback, passes markdown lint formatting, and has signed CLA.

Would appreciate a review/merge when you have a moment. Thanks!

@gemini-cli

gemini-cli Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Hi there! Thank you for your interest in contributing to Gemini CLI.

To ensure we maintain high code quality and focus on our prioritized roadmap, we only guarantee review and consideration of pull requests for issues that are explicitly labeled as 'help wanted'.

This PR will be closed in 7 days if it remains without that designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding.

@gemini-cli

gemini-cli Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

This pull request is being closed as it has been open for 14 days without a 'help wanted' designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding.

@gemini-cli gemini-cli Bot closed this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/platform Issues related to Build infra, Release mgmt, Testing, Eval infra, Capacity, Quota mgmt priority/p2 Important but can be addressed in a future release. size/xs An extra small PR status/pr-nudge-sent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants