mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-31 03:26:23 +02:00
rebase on master
This commit is contained in:
+6
-1
@@ -352,8 +352,13 @@ const (
|
||||
|
||||
// CountObjects returns the results of git count-objects on the repoPath
|
||||
func CountObjects(repoPath string) (*CountObject, error) {
|
||||
return CountObjectsWithEnv(repoPath, nil)
|
||||
}
|
||||
|
||||
// CountObjectsWithEnv returns the results of git count-objects on the repoPath with custom env setup
|
||||
func CountObjectsWithEnv(repoPath string, env []string) (*CountObject, error) {
|
||||
cmd := NewCommand("count-objects", "-v")
|
||||
stdout, err := cmd.RunInDir(repoPath)
|
||||
stdout, err := cmd.RunInDirWithEnv(repoPath, env)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user