Skip to content

[Resolver]: Add Git LFS and clone depth support #6866

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

Closed
wants to merge 2 commits into from

Conversation

malhotra5
Copy link
Contributor

@malhotra5 malhotra5 commented Feb 20, 2025

Fixes #6156

This PR adds support for:

  1. Skipping Git LFS files during clone by setting GIT_LFS_SKIP_SMUDGE=1
  2. Shallow cloning by setting GIT_CLONE_DEPTH=N where N is the desired depth

The changes:

  • Add Git LFS configuration before cloning when GIT_LFS_SKIP_SMUDGE=1 is set
  • Add --depth parameter to git clone when GIT_CLONE_DEPTH is set
  • Add unit tests to verify both features work correctly

Example workflow file:

env:
  GIT_LFS_SKIP_SMUDGE: '1'
  GIT_CLONE_DEPTH: '1'

To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:164fab0-nikolaik   --name openhands-app-164fab0   docker.all-hands.dev/all-hands-ai/openhands:164fab0

@malhotra5 malhotra5 changed the title Add Git LFS and clone depth support [Resolver]: Add Git LFS and clone depth support Feb 20, 2025
@malhotra5 malhotra5 marked this pull request as draft February 21, 2025 17:42
@neubig
Copy link
Contributor

neubig commented Feb 21, 2025

@OpenHands please fix the failing tests on this PR

Copy link

openhands-ai bot commented Feb 21, 2025

I'm working on a fix! @neubig can track my progress at all-hands.dev

@malhotra5
Copy link
Contributor Author

@OpenHands please fix the lint issues

Copy link

openhands-ai bot commented Feb 26, 2025

I'm working on a fix! @malhotra5 can track my progress at all-hands.dev

@mamoodi
Copy link
Collaborator

mamoodi commented Mar 18, 2025

@malhotra5 is this still in progress?

@turian
Copy link
Contributor

turian commented Mar 20, 2025

I am curious about this too @malhotra5

@mamoodi
Copy link
Collaborator

mamoodi commented Apr 7, 2025

@malhotra5 I'm going to close this and you can reopen when it's ready. I know you have a few things going on.

@mamoodi mamoodi closed this Apr 7, 2025
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 this pull request may close these issues.

[Resolver] Git LFS Support
4 participants