8000 fix: raise a Git::FailedError if depth < 0 is passed to Git.clone by jcouball · Pull Request #806 · ruby-git/ruby-git · GitHub
[go: up one dir, main page]

Skip to content

fix: raise a Git::FailedError if depth < 0 is passed to Git.clone #806

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

Merged
merged 1 commit into from
Jul 2, 2025

Conversation

jcouball
Copy link
Member
@jcouball jcouball commented Jul 2, 2025

Fixes #805

Currently, Git.clone(repository_url, dir, depth: -1) silently does not pass the depth option to the git command.

This change passes it through to the git command line which then return an error causing the Git.clone method to raise a Git::FailedError which is the desired behavior.

@jcouball jcouball merged commit 803253e into main Jul 2, 2025
8 checks passed
@jcouball jcouball deleted the fix_depth branch July 2, 2025 02:33
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.

Depth validation
1 participant
0