Skip to content

Commit b13d5a9

Browse files
committed
Fix typo in condition.
Signed-off-by: Filip Navara <[email protected]>
1 parent fd506b6 commit b13d5a9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

modules/git/repo_commit.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,14 @@ func (repo *Repository) getCommit(id SHA1) (*Commit, error) {
5757
commit := convertCommit(gogitCommit)
5858
commit.repo = repo
5959

60-
if tree, err := gogitCommit.Tree(); err != nil {
61-
commit.Tree.ID = tree.Hash
62-
commit.Tree.gogitTree = tree
60+
tree, err := gogitCommit.Tree()
61+
if err != nil {
62+
return nil, err
6363
}
6464

65+
commit.Tree.ID = tree.Hash
66+
commit.Tree.gogitTree = tree
67+
6568
data, err := NewCommand("name-rev", id.String()).RunInDirBytes(repo.Path)
6669
if err != nil {
6770
return nil, err

0 commit comments

Comments
 (0)