Re: [PATCH] connect.c: add a way for git-daemon to pass an error back to client
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 1, 2008, 02:19 UTC
- Message-ID
- <alpine.DEB.1.00.0811010316340.22125@pacific.mpi-cbg.de.mpi-cbg.de>
- In-Reply-To
- <b97024a40810311859t2e5a6102u31ad4480e7c75c03@mail.gmail.com>
Hi,
On Fri, 31 Oct 2008, Tom Preston-Werner wrote:
Show 13 quoted lines
> The current behavior of git-daemon is to simply close the connection on > any error condition. This leaves the client without any information as > to the cause of the failed fetch/push/etc. > > This patch allows get_remote_heads to accept a line prefixed with "ERR" > that it can display to the user in an informative fashion. Once clients > can understand this ERR line, git-daemon can be made to properly report > "repository not found", "permission denied", or other errors. > > Example > > S: ERR No matching repository. > C: fatal: remote error: No matching repository.
Makes sense to me.
The cute trick with this is that even older clients would be able to display the error, albeit with a sort of funny message:
protocol error: expected sha/ref, got 'No matching repository.'
Ciao, Dscho