]> source.dussan.org Git - gitea.git/commit
Prevent hang in git cat-file if the repository is not a valid repository (Partial...
authorzeripath <art27@cantab.net>
Fri, 17 Dec 2021 02:08:00 +0000 (02:08 +0000)
committerGitHub <noreply@github.com>
Fri, 17 Dec 2021 02:08:00 +0000 (10:08 +0800)
commit3ae4c4898b37e0fb9e6143d23767673a92bdf1fe
treecb7bac352065bb30de0dd6441472341a38bd78b5
parent3a77465e4ed252f5d92da12321613328b30b941c
Prevent hang in git cat-file if the repository is not a valid repository (Partial #17991) (#17992)

* Prevent hang in git cat-file if the repository is not a valid repository (Partial #17991)

Unfortunately it appears that if git cat-file is run in an invalid
repository it will hang until stdin is closed. This will result in
deadlocked /pulls pages and dangling git cat-file calls if a broken
repository is tried to be reviewed or pulls exists for a broken
repository.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* placate lint

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix compilation bug

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add the missing directories to the testrepos

* fixup! Add the missing directories to the testrepos

* and ensure that all of the other places have the objects directories too

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
integrations/integration_test.go
integrations/migration-test/migration_test.go
models/migrations/migrations_test.go
models/unit_tests.go
modules/git/batch_reader.go
modules/git/repo_base_nogogit.go
modules/git/repo_commit_nogogit.go
modules/indexer/code/bleve.go
modules/indexer/code/elastic_search.go
services/pull/pull.go