progrium/gitreceive — pull request #33 by Rogdham (2014-11-16 13:01:15+00:00)
Title: Error message for repo creation when file exits

When a file with the repo name exists in `$GITHOME`, exit with an error message.

This gives a proper error message (although I am open to suggestions for a better error message) when the user tries to create a repository but a file with the same name exits.

Example with the default settings (trying to create a repo named `receiver`, while a file with the same name exists in `$GITHOME`…):

Before:
```
$ git clone git@example.com:receiver
Cloning into 'receiver'...
Enter passphrase for key '':
mkdir: cannot create directory '/home/git/receiver': File exists
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists
```

After this PR:
```
$ git clone git@git.debiantest.local:receiver
Cloning into 'receiver'...
Enter passphrase for key '':
Fatal error: invalid repository name.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.
```

Do you think the error message should be made more obvious (e.g. by inserting a newline before and after)?