]> git.ipfire.org Git - thirdparty/git.git/commit - daemon.c
daemon: give friendlier error messages to clients
authorJeff King <peff@peff.net>
Fri, 14 Oct 2011 21:19:21 +0000 (17:19 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 16 Oct 2011 04:15:06 +0000 (21:15 -0700)
commitd5570f4d2cb29f3db9f69ff5fcde0a7d54ad2696
tree9751851f18c19c3a86e8c4e5ae1af9d2fc7da7d7
parent703f05ad5835cff92b12c29aecf8d724c8c847e2
daemon: give friendlier error messages to clients

When the git-daemon is asked about an inaccessible repository, it simply
hangs up the connection without saying anything further. This makes it
hard to distinguish between a repository we cannot access (e.g., due to
typo), and a service or network outage.

Instead, let's print an "ERR" line, which git clients understand since
v1.6.1 (2008-12-24).

Because there is a risk of leaking information about non-exported
repositories, by default all errors simply say "access denied or
repository not exported". Sites which don't have hidden repositories, or
don't care, can pass a flag to turn on more specific messages.

Signed-off-by: Jeff King <peff@peff.net>
Helped-by: Sitaram Chamarty <sitaramc@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-daemon.txt
daemon.c