aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/internal/dotgit/refs.go
diff options
context:
space:
mode:
Diffstat (limited to 'storage/filesystem/internal/dotgit/refs.go')
-rw-r--r--storage/filesystem/internal/dotgit/refs.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/storage/filesystem/internal/dotgit/refs.go b/storage/filesystem/internal/dotgit/refs.go
index 894732f..c32a7e5 100644
--- a/storage/filesystem/internal/dotgit/refs.go
+++ b/storage/filesystem/internal/dotgit/refs.go
@@ -32,10 +32,9 @@ func (d *DotGit) addRefsFromPackedRefs(refs *[]*core.Reference) (err error) {
path := d.fs.Join(d.path, packedRefsPath)
f, err := d.fs.Open(path)
if err != nil {
- if err == os.ErrNotExist {
+ if os.IsNotExist(err) {
return nil
}
-
return err
}
@@ -44,7 +43,6 @@ func (d *DotGit) addRefsFromPackedRefs(refs *[]*core.Reference) (err error) {
err = errClose
}
}()
-
s := bufio.NewScanner(f)
for s.Scan() {
ref, err := d.processLine(s.Text())