On Thu, Jan 16, 2014 at 01:14:28PM +0200, Nikos Chantziaras wrote > With overlays.gentoo.org being down, by update script takes a long time > to complete. Instead of Git telling me immediately that it can't connect > to the server, it just sits there for whole minutes doing nothing before > it decides to abort. > > This is extremely frustrating. Is there a way to change this behavior of > Git? Other software doesn't seem to have this problem (for example if I > browse to a web server that's down, the browser immediately tells me > that it can't connect, rather going for a coffee break first.)
Unfortunately, the git client itself can't do this, due to "keepalive" code built into git. See http://git.661346.n2.nabble.com/Request-timeout-option-for-remote-operations-esp-quot-git-fetch-quot-td7598943.html About the only thing you can do is use the "timeout" command to launch git as a subcommand, e.g. timeout 1m git fetch The downside of this approach is that if the git server is feeding data very slowly, your git client gets killed after the time limit, even if it's 90% of the way through the download. -- Walter Dnes <[email protected]> I don't run "desktop environments"; I run useful applications

