- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 934
Repo.clone_from does not account for kill_after_timeout #892
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
Comments
I ended up with this workaround for now but I think it would be good to address this problem as repo = Repo.init(some_path)
repo.git.remote("add", "origin", some_remote)
repo.git.pull("origin", "master", kill_after_timeout=1) |
In theory, it should pass through any Even though I didn't try to reproduce the issue, I think it's worth looking at it to see what's going on. |
The So, if we want to change @Byron Would you like take a look, and give some suggestion? |
Thanks for looking into it, having the links to code is very helpful. Setting That said, it's clearly an oversight in the implementation, one might want to try adding support for killing the process after timeout for the |
Before adding support on it, you could also use the below wordaround to support git clone with timeout:
from |
How can I get the repo object from this for iter_commits? Also specifying as_process in clone_from function results in a duplicate keyword arg exeception. |
|
Hi there,
as stated in the docs, there is a
kill_after_timeout
parameter to theGitCmd.execute
method which does exactly what it's supposed to be when, e.g., given to arepo.git.push
call.But it does not seem to be considered when passed to
Repo.clone_from
(cf. example below).Is this intended or a bug?
Or is there another way to freshly clone a repository and pass this argument?
The text was updated successfully, but these errors were encountered: