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

Set max depth when cloning a git repository #576

Open
ikhoon opened this issue Apr 1, 2021 · 1 comment
Open

Set max depth when cloning a git repository #576

ikhoon opened this issue Apr 1, 2021 · 1 comment

Comments

@ikhoon
Copy link
Contributor

ikhoon commented Apr 1, 2021

To support multiple sub-repositories, which mentioned in #575, we need to copy a snapshot of the existing git repository to a new one with truncating the original histories.
GitRepository already has some APIs that clones a git repository to another directory. However, it can not limit the number of max histories.

/**
* Clones this repository into a new one.
*/
public void cloneTo(File newRepoDir) {
cloneTo(newRepoDir, GitRepositoryFormat.V1);
}

It seems like a good idea to handle this issue first before proceeding with #575.

@minwoox
Copy link
Member

minwoox commented Apr 2, 2021

Thanks for the good opinion. Let me handle this together with #575. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants