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

On open repository open common cat file batch and batch-check #15667

Merged
merged 12 commits into from
May 10, 2021
Prev Previous commit
Next Next commit
protect against nil girepo close
Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath committed Apr 30, 2021

Verified

This commit was signed with the committer’s verified signature.
commit 5317d34fd004f4e2607926a3aa5008448f945dd1
3 changes: 3 additions & 0 deletions modules/git/repo_base_nogogit.go
Original file line number Diff line number Diff line change
@@ -71,6 +71,9 @@ func (repo *Repository) CatFileBatchCheck() (WriteCloserError, *bufio.Reader, fu

// Close this repository, in particular close the underlying gogitStorage if this is not nil
func (repo *Repository) Close() {
if repo == nil {
return
}
if repo.batchCancel != nil {
repo.batchCancel()
repo.batchReader = nil