Skip to content

Commit 7430a96

Browse files
authored
Apply suggestions from code review
1 parent c86392d commit 7430a96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

repo_tree.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ type LsTreeOptions struct {
9696
CommandOptions
9797
}
9898

99-
// LsTree returns the tree object in the repository by given revision.
99+
// LsTree returns the tree object in the repository by given tree ID.
100100
func (r *Repository) LsTree(treeID string, opts ...LsTreeOptions) (*Tree, error) {
101101
var opt LsTreeOptions
102102
if len(opts) > 0 {
@@ -108,6 +108,7 @@ func (r *Repository) LsTree(treeID string, opts ...LsTreeOptions) (*Tree, error)
108108
log("Cached tree hit: %s", treeID)
109109
return cache.(*Tree), nil
110110
}
111+
111112
var err error
112113
treeID, err = r.RevParse(treeID, RevParseOptions{Timeout: opt.Timeout}) //nolint
113114
if err != nil {

0 commit comments

Comments
 (0)