Add git timeout
Timeout remote git operations after 300 seconds.
Because it could be in an invalid state, delete the local repo if a
timeout occurs (subsequent operations will recreate it).
This replaces our use of the clone_from() and fetch() methods from
GitPython with lower-level equivalents. The high-level methods
do not currently permit the hard timeout.
The GitPython requirement is changed to a temporary fork until both
https://github.com/gitpython-developers/GitPython/pull/682
and
https://github.com/gitpython-developers/GitPython/pull/686
end up in a release.
Change-Id: I7f680472a8d67ff2dbe7956a8585fb3714119e65
diff --git a/tests/fixtures/fake_git.sh b/tests/fixtures/fake_git.sh
new file mode 100755
index 0000000..e1734be
--- /dev/null
+++ b/tests/fixtures/fake_git.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+echo $*
+case "$1" in
+ clone)
+ dest=$3
+ mkdir -p $dest/.git
+ ;;
+ version)
+ echo "git version 1.0.0"
+ exit 0
+ ;;
+esac
+sleep 30