diff options
Diffstat (limited to 'modules/git/repo_tree.go')
-rw-r--r-- | modules/git/repo_tree.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/modules/git/repo_tree.go b/modules/git/repo_tree.go index 3e7a9c2cfb..2e139daddf 100644 --- a/modules/git/repo_tree.go +++ b/modules/git/repo_tree.go @@ -24,11 +24,6 @@ type CommitTreeOpts struct { // CommitTree creates a commit from a given tree id for the user with provided message func (repo *Repository) CommitTree(author, committer *Signature, tree *Tree, opts CommitTreeOpts) (SHA1, error) { - err := LoadGitVersion() - if err != nil { - return SHA1{}, err - } - commitTimeStr := time.Now().Format(time.RFC3339) // Because this may call hooks we should pass in the environment @@ -60,14 +55,13 @@ func (repo *Repository) CommitTree(author, committer *Signature, tree *Tree, opt stdout := new(bytes.Buffer) stderr := new(bytes.Buffer) - err = cmd.Run(&RunOpts{ + err := cmd.Run(&RunOpts{ Env: env, Dir: repo.Path, Stdin: messageBytes, Stdout: stdout, Stderr: stderr, }) - if err != nil { return SHA1{}, ConcatenateError(err, stderr.String()) } |