diff options
Diffstat (limited to 'modules/git/repo_tree.go')
-rw-r--r-- | modules/git/repo_tree.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/git/repo_tree.go b/modules/git/repo_tree.go index 63c33379bf..9ee80351f0 100644 --- a/modules/git/repo_tree.go +++ b/modules/git/repo_tree.go @@ -21,7 +21,7 @@ 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) { +func (repo *Repository) CommitTree(author, committer *Signature, tree *Tree, opts CommitTreeOpts) (ObjectID, error) { commitTimeStr := time.Now().Format(time.RFC3339) // Because this may call hooks we should pass in the environment @@ -61,7 +61,7 @@ func (repo *Repository) CommitTree(author, committer *Signature, tree *Tree, opt Stderr: stderr, }) if err != nil { - return SHA1{}, ConcatenateError(err, stderr.String()) + return nil, ConcatenateError(err, stderr.String()) } - return NewIDFromString(strings.TrimSpace(stdout.String())) + return repo.objectFormat.NewIDFromString(strings.TrimSpace(stdout.String())) } |