diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2018-04-02 10:39:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-02 10:39:47 +0200 |
commit | 0c2618bc7d495322c6413b0ff62549712747cf9e (patch) | |
tree | 03ddc67b73733d0582367e9038c454353fa55955 /repository.go | |
parent | 160e6d5b654fbbaf0d9264f226c56a03f0e27d30 (diff) | |
parent | 6e07548d9078505ca2945f09d11729b14abcc907 (diff) | |
download | go-git-0c2618bc7d495322c6413b0ff62549712747cf9e.tar.gz |
Merge pull request #794 from jfontan/fix/checkclose
Use CheckClose with named returns and fix tests
Diffstat (limited to 'repository.go')
-rw-r--r-- | repository.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/repository.go b/repository.go index 98558d9..4ea51f5 100644 --- a/repository.go +++ b/repository.go @@ -270,9 +270,7 @@ func dotGitToOSFilesystems(path string) (dot, wt billy.Filesystem, err error) { return dot, fs, nil } -func dotGitFileToOSFilesystem(path string, fs billy.Filesystem) (billy.Filesystem, error) { - var err error - +func dotGitFileToOSFilesystem(path string, fs billy.Filesystem) (bfs billy.Filesystem, err error) { f, err := fs.Open(".git") if err != nil { return nil, err @@ -1092,7 +1090,7 @@ func (r *Repository) createNewObjectPack(cfg *RepackConfig) (h plumbing.Hash, er if los, ok := r.Storer.(storer.LooseObjectStorer); ok { err = los.ForEachObjectHash(func(hash plumbing.Hash) error { if ow.isSeen(hash) { - err := los.DeleteLooseObject(hash) + err = los.DeleteLooseObject(hash) if err != nil { return err } |