mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-06 07:34:06 +02:00
17 lines
474 B
Go
17 lines
474 B
Go
// Copyright 2024 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package gitrepo
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"code.gitea.io/gitea/modules/git"
|
|
)
|
|
|
|
// Fsck verifies the connectivity and validity of the objects in the database
|
|
func Fsck(ctx context.Context, repo Repository, timeout time.Duration, args git.TrustedCmdArgs) error {
|
|
return git.NewCommand("fsck").AddArguments(args...).Run(ctx, &git.RunOpts{Timeout: timeout, Dir: repoPath(repo)})
|
|
}
|