mirror of
https://github.com/go-gitea/git.git
synced 2026-02-05 15:45:40 +01:00
git fsck
This commit is contained in:
7
git.go
7
git.go
@@ -7,6 +7,7 @@ package git
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -54,3 +55,9 @@ func Version() (string, error) {
|
||||
func init() {
|
||||
Version()
|
||||
}
|
||||
|
||||
// Fsck verifies the connectivity and validity of the objects in the database
|
||||
func Fsck(repoPath string, timeout time.Duration, args ...string) error {
|
||||
_, err := NewCommand("fsck").AddArguments(args...).RunInDirTimeout(timeout, repoPath)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user