Repository navigation
docs: add Windows longpaths setup instructions to CONTRIBUTING.md - #28926
Shivang9983 wants to merge 3 commits into
Conversation
|
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. |
|
📊 PR Size: size/XS
|
Summary of ChangesHello, 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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Chirag6722
left a comment
There was a problem hiding this comment.
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.
|
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 Flagging it mainly because your #28926 is in the same position — it is documentation for a problem that has no 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 |
|
Hi @google-gemini/gemini-cli-docs Could someone please take a look at this PR and approve the workflow runs? Summary of changes:
Would appreciate a review/merge when you have a moment. Thanks! |
|
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. |
|
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. |
Summary
Adds Windows
core.longpaths=trueconfiguration instructions and recovery steps toCONTRIBUTING.md. On Windows systems, cloning without long paths support fails because deeply nested snapshot file paths exceed the default 260-characterMAX_PATHlimit, creating ~3,000 dirty staged deletions on a fresh checkout.Details
git clone -c core.longpaths=true <url>command under the Build process section.MAX_PATHsnapshot issue on Windows.git config core.longpaths true && git checkout -- .) for contributors who cloned without the flag.Related Issues
Related to #28830, #28832
How to Validate
CONTRIBUTING.mdand review the rendered Markdown under Setting up the development environment and Build process.npm run format/npm run preflight.git clone -c core.longpaths=true <repo-url>yields a clean working tree (0dirty/staged files).Pre-Merge Checklist