From 18e6f9daa3899318d36b525b068837f49bc2c1cf Mon Sep 17 00:00:00 2001 From: ferhat elmas Date: Wed, 29 Nov 2017 02:24:31 +0100 Subject: all: simplification - no length for map initialization - don't check for boolean/error return - don't format string - use string method of bytes buffer instead of converting bytes to string - use `strings.Contains` instead of `strings.Index` - use `bytes.Equal` instead of `bytes.Compare` --- references.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'references.go') diff --git a/references.go b/references.go index ff2c1d3..a1872a5 100644 --- a/references.go +++ b/references.go @@ -26,7 +26,7 @@ import ( // to fix this). func references(c *object.Commit, path string) ([]*object.Commit, error) { var result []*object.Commit - seen := make(map[plumbing.Hash]struct{}, 0) + seen := make(map[plumbing.Hash]struct{}) if err := walkGraph(&result, &seen, c, path); err != nil { return nil, err } -- cgit