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

Git clone skips files #1392

Open
DucretJe opened this issue Feb 27, 2025 · 3 comments · May be fixed by #1464
Open

Git clone skips files #1392

DucretJe opened this issue Feb 27, 2025 · 3 comments · May be fixed by #1464

Comments

@DucretJe
Copy link

Describe the bug

Version: Built from b98485d
Self Hosted

When cloning a repository, several files are skipped.

Link to the Bolt URL that caused the error

https://app-dev.boltdiy.orb.local/chat/4

Steps to reproduce

  1. Click on "Clone a Git Repo"
  2. Chose the repository from My Repos or via an URL
  3. Click on Import
  4. Choose the branch to clone
  5. Validate the Repository Overview

Expected behavior

I would expect to have all the files cloned.

Screen Recording / Screenshot

Image Image

Platform

  • OS: Docker
  • Browser: Arc
  • Version: Built from b98485d99f05fb067f5df027f2859409c6ce8be6

Provider Used

No response

Model Used

No response

Additional context

No response

@thecodacus
Copy link
Collaborator

can you provide a git url to reproduce the issue ?

@fieldofmars
Copy link

This block that supposed to skip binary files in app/components/chat/GitCloneButton.tsx is being too heavy handed, and skipping .py, .R, etc - anything that isn't define in that narrow whitelist.

 // Skip binary files
          if (
            content instanceof Uint8Array &&
            !filePath.match(/\.(txt|md|astro|mjs|js|jsx|ts|tsx|json|html|css|scss|less|yml|yaml|xml|svg)$/i)
          ) {
            skippedFiles.push(filePath);
            continue;
          }

Deleting this block altogether fixes the issue raised by this incident (and sure enough, my full repo suddenly reappears), but probably reintroduces the original issue it was trying to fix.

@KristianLake
Copy link

i can confirm this is a bigger issue. it skips large ts and tsx files for example. not sure why a clone cares how big files are

@fieldofmars fieldofmars linked a pull request Mar 6, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants