I use git clone in scripts, and I want to timeout the operation, if it takes longer than, say, N minutes to complet.
The reason is that some repositories are more than 5GB in size (even with --depth 1), which can take more than 30 minutes to download, depending on the load. I want to ignore these repositories.
Since git provides no way to check the size of a repository before cloning, the only solution I can think of is to specify a timeout for git clone. Is that possible?