Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Simplify code #1182

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions plumbing/object/commit_walker_bfs_filtered_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ func commitsFromIter(iter CommitIter) ([]*Commit, error) {
func assertHashes(c *C, commits []*Commit, hashes []string) {
if len(commits) != len(hashes) {
var expected []string
for _, c := range hashes {
expected = append(expected, c)
}
expected = append(expected, hashes...)
fmt.Println("expected:", strings.Join(expected, ", "))
var got []string
for _, c := range commits {
Expand All @@ -48,11 +46,7 @@ func assertHashes(c *C, commits []*Commit, hashes []string) {

func validIfCommit(ignored plumbing.Hash) CommitFilter {
return func(c *Commit) bool {
if c.Hash == ignored {
return true
}

return false
return c.Hash == ignored
}
}

Expand Down