git-daemon: re-organize code a bit for --inetd flag