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.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/storage/filesystem/internal/dotgit/refs.go b/storage/filesystem/internal/dotgit/refs.go
index ca11f6c..8f28332 100644
--- a/storage/filesystem/internal/dotgit/refs.go
+++ b/storage/filesystem/internal/dotgit/refs.go
@@ -81,6 +81,10 @@ func (d *DotGit) addRefsFromRefDir(refs *[]*core.Reference) error {
func (d *DotGit) walkReferencesTree(refs *[]*core.Reference, relPath string) error {
files, err := d.fs.ReadDir(relPath)
if err != nil {
+ if os.IsNotExist(err) {
+ return nil
+ }
+
return err
}
@@ -110,6 +114,10 @@ func (d *DotGit) walkReferencesTree(refs *[]*core.Reference, relPath string) err
func (d *DotGit) addRefFromHEAD(refs *[]*core.Reference) error {
ref, err := d.readReferenceFile(".", "HEAD")
if err != nil {
+ if os.IsNotExist(err) {
+ return nil
+ }
+
return err
}