refactor: remove useless return error in git

main
hau 2020-11-10 23:39:40 +07:00
parent 688223878d
commit 3f0d05c741
1 changed files with 2 additions and 12 deletions

View File

@ -72,12 +72,7 @@ func (r *repo) LogExcludeTo(fromRev, toRev string) ([]Commit, error) {
return nil, err
}
commits, err := r.logWithStopFnFirst(fromHash, stopAtHash(toHash))
if err != nil {
return nil, err
}
return commits, nil
return r.logWithStopFnFirst(fromHash, stopAtHash(toHash))
}
// Get all commits between <from revision> and <to revision> (include <to revision>)
@ -100,12 +95,7 @@ func (r *repo) LogIncludeTo(fromRev, toRev string) ([]Commit, error) {
return nil, err
}
commits, err := r.logWithStopFnLast(fromHash, stopAtHash(toHash))
if err != nil {
return nil, err
}
return commits, nil
return r.logWithStopFnLast(fromHash, stopAtHash(toHash))
}
func (r *repo) log(fromHash *plumbing.Hash) ([]Commit, error) {