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

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
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

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
2 participants