# git cole give unexpected error message

5 messages from 2005-12-13 to 2005-12-14. Participants: Sam Ravnborg, Petr Baudis, Andreas Ericsson.
Thread: https://gitlist.dev/t/2825

## Sam Ravnborg, 2005-12-13 21:28

Subject: git cole give unexpected error message
Message-ID: <20051213212820.GB5232@mars.ravnborg.org>
URL: https://gitlist.dev/e/20051213212820.GB5232%40mars.ravnborg.org

```
Encountered following minor issue today:

Executed:
sam@mars ~/work $ git clone git://git.kernel.org/pub/scm/lib/klibc/klibc.git viggo
defaulting to local storage area
fatal: unexpected EOF

The errormessage "fatal: unexpected EOF" did not immediately tell me
that the requested git repository did not exists.

But I corrected the path and tried again:
sam@mars ~/work $ git clone git://git.kernel.org/pub/scm/libs/klibc/klibc.git viggo
viggo already exists.

So one can see that git did not clean up after the faulty clone.

It would be nice if git:
1) Displayed a more meaningfull error message
2) Cleaned up so I did not have to do a manual rm -rf viggo


cogito being a nice porcelain gives the git errormessage but manage to
clean up when the clone fails.
So also cogito would benefit from a more descriptive errormessage.

	Sam

```

## Petr Baudis, 2005-12-13 22:28

Subject: Re: git cole give unexpected error message
Message-ID: <20051213222829.GE22159@pasky.or.cz>
URL: https://gitlist.dev/e/20051213222829.GE22159%40pasky.or.cz
In-Reply-To: <20051213212820.GB5232@mars.ravnborg.org>

```
Dear diary, on Tue, Dec 13, 2005 at 10:28:20PM CET, I got a letter
where Sam Ravnborg <sam@ravnborg.org> said that...
> cogito being a nice porcelain gives the git errormessage but manage to
> clean up when the clone fails.
> So also cogito would benefit from a more descriptive errormessage.

Well, git clone can fail for many reasons and I don't think the "no such
repository" one is completely overwhelming, so hinting that by Cogito
could be quite confusing (theme of the day: usability ;-)).

The real solution would be proper error reporting by the git daemon.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.

```

## Andreas Ericsson, 2005-12-14 09:36

Subject: Re: git cole give unexpected error message
Message-ID: <439FE7AD.6080602@op5.se>
URL: https://gitlist.dev/e/439FE7AD.6080602%40op5.se
In-Reply-To: <20051213222829.GE22159@pasky.or.cz>

```
Petr Baudis wrote:
> Dear diary, on Tue, Dec 13, 2005 at 10:28:20PM CET, I got a letter
> where Sam Ravnborg <sam@ravnborg.org> said that...
> 
>>cogito being a nice porcelain gives the git errormessage but manage to
>>clean up when the clone fails.
>>So also cogito would benefit from a more descriptive errormessage.
> 
> 
> Well, git clone can fail for many reasons and I don't think the "no such
> repository" one is completely overwhelming, so hinting that by Cogito
> could be quite confusing (theme of the day: usability ;-)).
> 
> The real solution would be proper error reporting by the git daemon.
> 

But that would open up for an information disclosure. If someone's 
hacking on a patch, please make it configurable at least.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

```

## Petr Baudis, 2005-12-14 11:41

Subject: Re: git cole give unexpected error message
Message-ID: <20051214114156.GG22159@pasky.or.cz>
URL: https://gitlist.dev/e/20051214114156.GG22159%40pasky.or.cz
In-Reply-To: <439FE7AD.6080602@op5.se>

```
Dear diary, on Wed, Dec 14, 2005 at 10:36:45AM CET, I got a letter
where Andreas Ericsson <ae@op5.se> said that...
> Petr Baudis wrote:
> >Dear diary, on Tue, Dec 13, 2005 at 10:28:20PM CET, I got a letter
> >where Sam Ravnborg <sam@ravnborg.org> said that...
> >
> >>cogito being a nice porcelain gives the git errormessage but manage to
> >>clean up when the clone fails.
> >>So also cogito would benefit from a more descriptive errormessage.
> >
> >
> >Well, git clone can fail for many reasons and I don't think the "no such
> >repository" one is completely overwhelming, so hinting that by Cogito
> >could be quite confusing (theme of the day: usability ;-)).
> >
> >The real solution would be proper error reporting by the git daemon.
> >
> 
> But that would open up for an information disclosure. If someone's 
> hacking on a patch, please make it configurable at least.

When it breaks at this stage, it's either some bad internal error (I
guess memory allocation error might do this), permission problem, or
repository not being found. We might then report a more generic error
message "Repository not found or access denied.".

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.

```

## Sam Ravnborg, 2005-12-14 21:20

Subject: Re: git cole give unexpected error message
Message-ID: <20051214212003.GA17495@mars.ravnborg.org>
URL: https://gitlist.dev/e/20051214212003.GA17495%40mars.ravnborg.org
In-Reply-To: <20051213222829.GE22159@pasky.or.cz>

```
On Tue, Dec 13, 2005 at 11:28:29PM +0100, Petr Baudis wrote:
> Dear diary, on Tue, Dec 13, 2005 at 10:28:20PM CET, I got a letter
> where Sam Ravnborg <sam@ravnborg.org> said that...
> > cogito being a nice porcelain gives the git errormessage but manage to
> > clean up when the clone fails.
> > So also cogito would benefit from a more descriptive errormessage.
> 
> Well, git clone can fail for many reasons and I don't think the "no such
> repository" one is completely overwhelming, so hinting that by Cogito
> could be quite confusing (theme of the day: usability ;-)).
> 
> The real solution would be proper error reporting by the git daemon.
Which was my point too.
When using cogito it displyed the git error message so having git to
print a sensible error message would also benefit cogito.

	Sam

```
