rebase on master

This commit is contained in:
Antoine GIRARD
2020-11-18 00:44:54 +01:00
parent 0615b668dc
commit bb96349d09
13 changed files with 99 additions and 5 deletions
+6 -1
View File
@@ -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
}