aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/internal/dotgit/refs.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-09-06 01:56:41 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-09-06 01:56:41 +0200
commitae2b10d50da5455b382ab9d543be4fe859afe9e0 (patch)
tree58cf3247a7283769c77df945f1be9a5d70e65a69 /storage/filesystem/internal/dotgit/refs.go
parent0b7aa259fe3da2236952843fe46db62bdee395eb (diff)
downloadgo-git-ae2b10d50da5455b382ab9d543be4fe859afe9e0.tar.gz
storage: filesystem idx generation (wip)
Diffstat (limited to 'storage/filesystem/internal/dotgit/refs.go')
-rw-r--r--storage/filesystem/internal/dotgit/refs.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/storage/filesystem/internal/dotgit/refs.go b/storage/filesystem/internal/dotgit/refs.go
index c32a7e5..ca11f6c 100644
--- a/storage/filesystem/internal/dotgit/refs.go
+++ b/storage/filesystem/internal/dotgit/refs.go
@@ -29,8 +29,7 @@ const (
)
func (d *DotGit) addRefsFromPackedRefs(refs *[]*core.Reference) (err error) {
- path := d.fs.Join(d.path, packedRefsPath)
- f, err := d.fs.Open(path)
+ f, err := d.fs.Open(packedRefsPath)
if err != nil {
if os.IsNotExist(err) {
return nil
@@ -80,7 +79,7 @@ func (d *DotGit) addRefsFromRefDir(refs *[]*core.Reference) error {
}
func (d *DotGit) walkReferencesTree(refs *[]*core.Reference, relPath string) error {
- files, err := d.fs.ReadDir(d.fs.Join(d.path, relPath))
+ files, err := d.fs.ReadDir(relPath)
if err != nil {
return err
}
@@ -95,7 +94,7 @@ func (d *DotGit) walkReferencesTree(refs *[]*core.Reference, relPath string) err
continue
}
- ref, err := d.readReferenceFile(d.path, newRelPath)
+ ref, err := d.readReferenceFile(".", newRelPath)
if err != nil {
return err
}
@@ -109,7 +108,7 @@ func (d *DotGit) walkReferencesTree(refs *[]*core.Reference, relPath string) err
}
func (d *DotGit) addRefFromHEAD(refs *[]*core.Reference) error {
- ref, err := d.readReferenceFile(d.path, "HEAD")
+ ref, err := d.readReferenceFile(".", "HEAD")
if err != nil {
return err
}