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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: gotwebd: stop ignoring GOT_ERR_LONELY_PACKIDX?
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 28 Apr 2023 13:51:06 +0200

Download raw body.

Thread
On Fri, Apr 28, 2023 at 11:30:12AM +0200, Omar Polo wrote:
> While the fix would be really simple, just turn an == into a != and
> call it a day, I was wondering why gotwebd is the only component that
> explicitly ignores GOT_ERR_LONELY_PACKIDX?  Can we fail like got, tog
> etc... do?
 
This error will liekly happen if git is used to fetch changes into
the repository over https. Since this is a legitimate way of syncing
repositories it is indeed important to ignore this error otherwise
gotwebd will only show error pages on affected repositories.
And it doesn't make sense to display this error to people who cannot
do anything about it. Git ignores this condition but we dicided to
error because it could be repository corruption (such as an accidentally
deleted .pack file).

Please fix this broken log instead:

                error = gotweb_load_got_path(c, repo_dir);
                if (error && error->code == GOT_ERR_LONELY_PACKIDX) {
                        if (error->code != GOT_ERR_NOT_GIT_REPO)
                                  ^^^^^^^^^^^ always true