mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-02 20:06:06 +01:00 
			
		
		
		
	The name cmd is already used in many places and may cause conflicts, so I chose `gitcmd` instead to minimize potential naming conflicts.
		
			
				
	
	
		
			17 lines
		
	
	
		
			490 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			490 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/gitcmd"
 | 
						|
)
 | 
						|
 | 
						|
// Fsck verifies the connectivity and validity of the objects in the database
 | 
						|
func Fsck(ctx context.Context, repo Repository, timeout time.Duration, args gitcmd.TrustedCmdArgs) error {
 | 
						|
	return gitcmd.NewCommand("fsck").AddArguments(args...).Run(ctx, &gitcmd.RunOpts{Timeout: timeout, Dir: repoPath(repo)})
 | 
						|
}
 |