Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message for repo creation when file exits #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Rogdham
Copy link

@Rogdham Rogdham commented Nov 16, 2014

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 [email protected]:receiver
Cloning into 'receiver'...
Enter passphrase for key '<snip>': 
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 [email protected]:receiver
Cloning into 'receiver'...
Enter passphrase for key '<snip>': 
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)?

When a file with the repo name exists in $GITHOME, exit with an error message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant