"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Martin Pieuchot <mpi@openbsd.org>
Subject:
Re: faster history traversal for 'got blame'
To:
gameoftrees@openbsd.org
Date:
Wed, 8 Jan 2020 12:14:32 +0100

Download raw body.

Thread
On 08/01/20(Wed) 09:26, Stefan Sperling wrote:
> On Wed, Jan 08, 2020 at 08:33:06AM +0100, Martin Pieuchot wrote:
> > One question below:
> > 
> > > @@ -129,6 +129,7 @@
> > >  #define GOT_ERR_REF_NAME_MINUS	113
> > >  #define GOT_ERR_GITCONFIG_SYNTAX 114
> > >  #define GOT_ERR_REBASE_OUT_OF_DATE 115
> > > +#define GOT_ERR_CACHE_DUP_ENTRY	116
> > >  
> > >  static const struct got_error {
> > >  	int code;
> > > @@ -265,6 +266,7 @@ static const struct got_error {
> > >  	{ GOT_ERR_GITCONFIG_SYNTAX, "gitconfig syntax error" },
> > >  	{ GOT_ERR_REBASE_OUT_OF_DATE, "work tree must be updated before it "
> > >  	    "can be used to rebase a branch" },
> > > +	{ GOT_ERR_CACHE_DUP_ENTRY, "duplicate cache entry" },
> > 
> > Isn't a duplicated cache entry some kind of code error?  Or this can
> > happen in a repo?
> 
> Just to catch coding errors.
> I don't want to rely on asserts or other hard failures in this code.

I understand.  I was pointing this out in case you'd like to separate
errors that can occur because they are part of the normal use of a
system versus programming mistakes that we also generally name errors :)